buttons: Fix background functions for non-default layouts

While the configured layout is taken into account for positioning
the buttons, the mapping from button function states to button
position states just assumed the default button layout in LTR
locales.
Do a proper mapping depending on the actual layout instead.

https://bugzilla.gnome.org/show_bug.cgi?id=635686
This commit is contained in:
Florian Müllner
2010-12-02 01:16:10 +01:00
parent 48b9807c86
commit 9f2581318a
3 changed files with 105 additions and 15 deletions

View File

@@ -2398,20 +2398,6 @@ meta_frames_paint (MetaFrames *frames,
default:
break;
}
/* Map button function states to button position states */
button_states[META_BUTTON_TYPE_LEFT_LEFT_BACKGROUND] =
button_states[META_BUTTON_TYPE_MENU];
button_states[META_BUTTON_TYPE_LEFT_MIDDLE_BACKGROUND] =
META_BUTTON_STATE_NORMAL;
button_states[META_BUTTON_TYPE_LEFT_RIGHT_BACKGROUND] =
META_BUTTON_STATE_NORMAL;
button_states[META_BUTTON_TYPE_RIGHT_LEFT_BACKGROUND] =
button_states[META_BUTTON_TYPE_MINIMIZE];
button_states[META_BUTTON_TYPE_RIGHT_MIDDLE_BACKGROUND] =
button_states[META_BUTTON_TYPE_MAXIMIZE];
button_states[META_BUTTON_TYPE_RIGHT_RIGHT_BACKGROUND] =
button_states[META_BUTTON_TYPE_CLOSE];
meta_core_get (display, frame->xwindow,
META_CORE_GET_FRAME_FLAGS, &flags,