Added a gconf key to swap the meanings of the right and
middle buttons when the modifier key is held down. Closes #437910. Thanks to Matt Kraai for looking over the patch. * src/core/display.c: * src/core/prefs.c: * src/include/prefs.h: * src/metacity.schemas.in.in: svn path=/trunk/; revision=4091
This commit is contained in:
@ -1669,7 +1669,7 @@ event_callback (XEvent *event,
|
||||
if (!unmodified)
|
||||
begin_move = TRUE;
|
||||
}
|
||||
else if (!unmodified && event->xbutton.button == 2)
|
||||
else if (!unmodified && event->xbutton.button == meta_prefs_get_mouse_button_resize())
|
||||
{
|
||||
if (window->has_resize_func)
|
||||
{
|
||||
@ -1718,7 +1718,7 @@ event_callback (XEvent *event,
|
||||
event->xbutton.y_root);
|
||||
}
|
||||
}
|
||||
else if (event->xbutton.button == 3)
|
||||
else if (event->xbutton.button == meta_prefs_get_mouse_button_menu())
|
||||
{
|
||||
if (meta_prefs_get_raise_on_click ())
|
||||
meta_window_raise (window);
|
||||
|
@ -94,6 +94,7 @@ static gboolean gnome_animations = TRUE;
|
||||
static char *cursor_theme = NULL;
|
||||
static int cursor_size = 24;
|
||||
static gboolean compositing_manager = FALSE;
|
||||
static gboolean resize_with_right_button = FALSE;
|
||||
|
||||
static MetaVisualBellType visual_bell_type = META_VISUAL_BELL_FULLSCREEN_FLASH;
|
||||
static MetaButtonLayout button_layout;
|
||||
@ -403,6 +404,11 @@ static MetaBoolPreference preferences_bool[] =
|
||||
&compositing_manager,
|
||||
FALSE,
|
||||
},
|
||||
{ "/apps/metacity/general/resize_with_right_button",
|
||||
META_PREF_RESIZE_WITH_RIGHT_BUTTON,
|
||||
&resize_with_right_button,
|
||||
FALSE,
|
||||
},
|
||||
{ NULL, 0, NULL, FALSE },
|
||||
};
|
||||
|
||||
@ -1740,6 +1746,9 @@ meta_preference_to_string (MetaPreference pref)
|
||||
|
||||
case META_PREF_COMPOSITING_MANAGER:
|
||||
return "COMPOSITING_MANAGER";
|
||||
|
||||
case META_PREF_RESIZE_WITH_RIGHT_BUTTON:
|
||||
return "RESIZE_WITH_RIGHT_BUTTON";
|
||||
}
|
||||
|
||||
return "(unknown)";
|
||||
@ -2714,6 +2723,18 @@ meta_prefs_get_compositing_manager (void)
|
||||
return compositing_manager;
|
||||
}
|
||||
|
||||
guint
|
||||
meta_prefs_get_mouse_button_resize (void)
|
||||
{
|
||||
return resize_with_right_button ? 3: 2;
|
||||
}
|
||||
|
||||
guint
|
||||
meta_prefs_get_mouse_button_menu (void)
|
||||
{
|
||||
return resize_with_right_button ? 2: 3;
|
||||
}
|
||||
|
||||
void
|
||||
meta_prefs_set_compositing_manager (gboolean whether)
|
||||
{
|
||||
|
Reference in New Issue
Block a user