Make the 'locate pointer' effect robust against compositing manager changes

This commit is contained in:
Matthias Clasen 2009-06-09 02:03:50 +00:00
parent 0025f59067
commit b72789ff30
2 changed files with 47 additions and 1 deletions

38
composited-changed.patch Normal file
View File

@ -0,0 +1,38 @@
--- gnome-settings-daemon-2.27.1/plugins/mouse/gsd-locate-pointer.c 2009-05-03 14:15:30.000000000 -0400
+++ hacked/plugins/mouse/gsd-locate-pointer.c 2009-06-08 21:54:05.537099156 -0400
@@ -195,6 +195,22 @@
}
static void
+unset_transparent_shape (GdkWindow *window)
+{
+ gdk_window_shape_combine_mask (data->window, NULL, 0, 0);
+}
+
+static void
+composited_changed (GtkWidget *widget,
+ GsdLocatePointerData *data)
+{
+ if (!gtk_widget_is_composited (widget))
+ set_transparent_shape (data->window);
+ else
+ unset_transparent_shape (data->window);
+}
+
+static void
timeline_finished_cb (GsdTimeline *timeline,
gpointer user_data)
{
@@ -317,8 +333,10 @@
data->progress = 0.;
- if (!gtk_widget_is_composited (data->widget))
- set_transparent_shape (data->window);
+ g_signal_connect (data->widget, "composited-changed",
+ G_CALLBACK (composited_changed), data);
+
+ composited_changed (data->widget, data);
gdk_window_show (data->window);
move_locate_pointer_window (data, screen);

View File

@ -1,6 +1,6 @@
Name: gnome-settings-daemon
Version: 2.27.1
Release: 1%{?dist}
Release: 2%{?dist}
Summary: The daemon sharing settings from GNOME to GTK+/KDE applications
Group: System Environment/Daemons
@ -38,6 +38,9 @@ Patch11: gnome-settings-daemon-2.26.0-support-touchpads.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=483639
Patch12: gnome-settings-daemon-2.26.1-fix-touchpad.patch
# http://bugzilla.gnome.org/show_bug.cgi?id=585209
Patch13: composited-changed.patch
%description
A daemon to share settings from GNOME to other applications. It also
handles global keybindings, as well as a number of desktop-wide settings.
@ -58,6 +61,7 @@ developing applications that use %{name}.
%patch11 -p1 -b .support-touchpads
%patch12 -p1 -b .lefthand-touchpad
%patch13 -p1 -b .composited-changed
autoreconf -i -f
@ -170,6 +174,10 @@ fi
%{_libdir}/pkgconfig/gnome-settings-daemon.pc
%changelog
* Mon Jun 8 2009 Matthias Clasen <mclasen@redhat.com> 2.27.1-2
- Make the 'locate pointer' effect cope with changing compositing
managers
* Sat May 16 2009 Matthias Clasen <mclasen@redhat.com> 2.27.1-1
- Update to 2.27.1