Update to latest upstream version
This commit is contained in:
parent
87f6f52d49
commit
f271ca0193
@ -1,150 +0,0 @@
|
||||
From 86fd12cbf06f693405650b9d6f7c6234757cc354 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Drake <dsd@laptop.org>
|
||||
Date: Wed, 30 May 2012 15:42:34 +0000
|
||||
Subject: Add disable-mouse-button-modifiers message
|
||||
|
||||
Similar to the disable-keybindings message, Sugar would like to be able
|
||||
to disable this specific part of the metacity functionality without
|
||||
changing the GSettings configuration (which would also affect GNOME).
|
||||
|
||||
Add a new metacity-message command to disable mouse button modifiers,
|
||||
which ordinarily let windows be dragged around the screen when a specific
|
||||
modifier is pressed.
|
||||
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=677115
|
||||
---
|
||||
diff --git a/src/core/atomnames.h b/src/core/atomnames.h
|
||||
index 338d055..14dbd8f 100644
|
||||
--- a/src/core/atomnames.h
|
||||
+++ b/src/core/atomnames.h
|
||||
@@ -57,6 +57,7 @@ item(_KWM_WIN_ICON)
|
||||
item(_METACITY_RESTART_MESSAGE)
|
||||
item(_METACITY_RELOAD_THEME_MESSAGE)
|
||||
item(_METACITY_SET_KEYBINDINGS_MESSAGE)
|
||||
+item(_METACITY_SET_MOUSEMODS_MESSAGE)
|
||||
item(_METACITY_TOGGLE_VERBOSE)
|
||||
item(_GNOME_PANEL_ACTION)
|
||||
item(_GNOME_PANEL_ACTION_MAIN_MENU)
|
||||
diff --git a/src/core/display.c b/src/core/display.c
|
||||
index b70112d..440f2fb 100644
|
||||
--- a/src/core/display.c
|
||||
+++ b/src/core/display.c
|
||||
@@ -135,6 +135,8 @@ typedef struct
|
||||
*/
|
||||
static MetaDisplay *the_display = NULL;
|
||||
|
||||
+static gboolean mousemods_disabled = FALSE;
|
||||
+
|
||||
#ifdef WITH_VERBOSE_MODE
|
||||
static void meta_spew_event (MetaDisplay *display,
|
||||
XEvent *event);
|
||||
@@ -157,6 +159,9 @@ static void process_selection_clear (MetaDisplay *display,
|
||||
|
||||
static void update_window_grab_modifiers (MetaDisplay *display);
|
||||
|
||||
+static void set_mousemods_disabled (MetaDisplay *display,
|
||||
+ gboolean setting);
|
||||
+
|
||||
static void prefs_changed_callback (MetaPreference pref,
|
||||
void *data);
|
||||
|
||||
@@ -2271,6 +2276,13 @@ event_callback (XEvent *event,
|
||||
meta_set_keybindings_disabled (display, !event->xclient.data.l[0]);
|
||||
}
|
||||
else if (event->xclient.message_type ==
|
||||
+ display->atom__METACITY_SET_MOUSEMODS_MESSAGE)
|
||||
+ {
|
||||
+ meta_verbose ("Received set mousemods request = %d\n",
|
||||
+ (int) event->xclient.data.l[0]);
|
||||
+ set_mousemods_disabled (display, !event->xclient.data.l[0]);
|
||||
+ }
|
||||
+ else if (event->xclient.message_type ==
|
||||
display->atom__METACITY_TOGGLE_VERBOSE)
|
||||
{
|
||||
meta_verbose ("Received toggle verbose message\n");
|
||||
@@ -3701,7 +3713,7 @@ meta_display_grab_window_buttons (MetaDisplay *display,
|
||||
* XSync()
|
||||
*/
|
||||
|
||||
- if (display->window_grab_modifiers != 0)
|
||||
+ if (display->window_grab_modifiers != 0 && !mousemods_disabled)
|
||||
{
|
||||
gboolean debug = g_getenv ("METACITY_DEBUG_BUTTON_GRABS") != NULL;
|
||||
int i;
|
||||
@@ -3835,6 +3847,15 @@ meta_display_ungrab_focus_window_button (MetaDisplay *display,
|
||||
}
|
||||
}
|
||||
|
||||
+static void
|
||||
+set_mousemods_disabled (MetaDisplay *display,
|
||||
+ gboolean setting)
|
||||
+{
|
||||
+ mousemods_disabled = setting;
|
||||
+ prefs_changed_callback(META_PREF_MOUSE_BUTTON_MODS, display);
|
||||
+ meta_verbose ("Mouse button modifiers %s\n", mousemods_disabled ? "disabled" : "enabled");
|
||||
+}
|
||||
+
|
||||
void
|
||||
meta_display_increment_event_serial (MetaDisplay *display)
|
||||
{
|
||||
diff --git a/src/tools/metacity-message.c b/src/tools/metacity-message.c
|
||||
index 8d5548c..9aae733 100644
|
||||
--- a/src/tools/metacity-message.c
|
||||
+++ b/src/tools/metacity-message.c
|
||||
@@ -114,6 +114,34 @@ send_set_keybindings (gboolean enabled)
|
||||
XSync (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), False);
|
||||
}
|
||||
|
||||
+static void
|
||||
+send_set_mousemods (gboolean enabled)
|
||||
+{
|
||||
+ XEvent xev;
|
||||
+
|
||||
+ xev.xclient.type = ClientMessage;
|
||||
+ xev.xclient.serial = 0;
|
||||
+ xev.xclient.send_event = True;
|
||||
+ xev.xclient.display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
|
||||
+ xev.xclient.window = gdk_x11_get_default_root_xwindow ();
|
||||
+ xev.xclient.message_type = XInternAtom (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
|
||||
+ "_METACITY_SET_MOUSEMODS_MESSAGE",
|
||||
+ False);
|
||||
+ xev.xclient.format = 32;
|
||||
+ xev.xclient.data.l[0] = enabled;
|
||||
+ xev.xclient.data.l[1] = 0;
|
||||
+ xev.xclient.data.l[2] = 0;
|
||||
+
|
||||
+ XSendEvent (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
|
||||
+ gdk_x11_get_default_root_xwindow (),
|
||||
+ False,
|
||||
+ SubstructureRedirectMask | SubstructureNotifyMask,
|
||||
+ &xev);
|
||||
+
|
||||
+ XFlush (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()));
|
||||
+ XSync (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), False);
|
||||
+}
|
||||
+
|
||||
#ifdef WITH_VERBOSE_MODE
|
||||
static void
|
||||
send_toggle_verbose (void)
|
||||
@@ -148,7 +176,7 @@ static void
|
||||
usage (void)
|
||||
{
|
||||
g_printerr (_("Usage: %s\n"),
|
||||
- "metacity-message (restart|reload-theme|enable-keybindings|disable-keybindings|toggle-verbose)");
|
||||
+ "metacity-message (restart|reload-theme|enable-keybindings|disable-keybindings|enable-mouse-button-modifiers|disable-mouse-button-modifiers|toggle-verbose)");
|
||||
exit (1);
|
||||
}
|
||||
|
||||
@@ -170,6 +198,10 @@ main (int argc, char **argv)
|
||||
send_set_keybindings (TRUE);
|
||||
else if (strcmp (argv[1], "disable-keybindings") == 0)
|
||||
send_set_keybindings (FALSE);
|
||||
+ else if (strcmp (argv[1], "enable-mouse-button-modifiers") == 0)
|
||||
+ send_set_mousemods (TRUE);
|
||||
+ else if (strcmp (argv[1], "disable-mouse-button-modifiers") == 0)
|
||||
+ send_set_mousemods (FALSE);
|
||||
else if (strcmp (argv[1], "toggle-verbose") == 0)
|
||||
{
|
||||
#ifndef WITH_VERBOSE_MODE
|
||||
--
|
||||
cgit v0.9.0.2
|
||||
@ -2,8 +2,8 @@
|
||||
|
||||
Summary: Unobtrusive window manager
|
||||
Name: metacity
|
||||
Version: 2.34.3
|
||||
Release: 4%{?dist}
|
||||
Version: 2.34.5
|
||||
Release: 1%{?dist}
|
||||
URL: http://download.gnome.org/sources/metacity/
|
||||
Source0: http://download.gnome.org/sources/metacity/2.34/metacity-%{version}.tar.xz
|
||||
# http://bugzilla.gnome.org/show_bug.cgi?id=558723
|
||||
@ -32,8 +32,6 @@ Patch25: metacity-2.28-xioerror-unknown-display.patch
|
||||
Patch28: Stop-confusing-GDK-s-grab-tracking.patch
|
||||
# https://bugzilla.gnome.org/show_bug.cgi?id=622517
|
||||
Patch29: Allow-breaking-out-from-maximization-during-mouse.patch
|
||||
# https://bugzilla.gnome.org/show_bug.cgi?id=677115
|
||||
Patch30: disable-mouse-button-modifiers.patch
|
||||
|
||||
Source1: window.png
|
||||
Source2: mini-window.png
|
||||
@ -103,7 +101,6 @@ API. This package exists purely for technical reasons.
|
||||
%patch25 -p1 -b .xioerror-unknown-display
|
||||
%patch28 -p1 -b .grab-tracking
|
||||
%patch29 -p1 -b .mouse-unmaximize
|
||||
%patch30 -p1 -b .button-modifiers
|
||||
|
||||
cp -p %{SOURCE1} %{SOURCE2} src/
|
||||
|
||||
@ -185,6 +182,9 @@ fi
|
||||
%{_mandir}/man1/metacity-window-demo.1.gz
|
||||
|
||||
%changelog
|
||||
* Mon Aug 06 2012 Florian Müllner <fmuellner@redhat.com> - 2.34.5-1
|
||||
- Update to new upstream version, drop upstreamed patch
|
||||
|
||||
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.34.3-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user