diff options
Diffstat (limited to 'gnome-base/gnome-applets/files/gnome-applets-2.16.0.1-desktop-clicks.patch')
-rw-r--r-- | gnome-base/gnome-applets/files/gnome-applets-2.16.0.1-desktop-clicks.patch | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/gnome-base/gnome-applets/files/gnome-applets-2.16.0.1-desktop-clicks.patch b/gnome-base/gnome-applets/files/gnome-applets-2.16.0.1-desktop-clicks.patch new file mode 100644 index 0000000..cdb2585 --- /dev/null +++ b/gnome-base/gnome-applets/files/gnome-applets-2.16.0.1-desktop-clicks.patch @@ -0,0 +1,68 @@ +From Fedora Core 6: + +https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=205909 - stickynotes applet wakes up every 100ms +http://cvs.fedora.redhat.com/viewcvs/*checkout*/rpms/gnome-applets/devel/gnome-applets-2.16.0.1-desktop-clicks.patch?rev=1.1 + +--- gnome-applets-2.16.0.1/stickynotes/stickynotes_applet_callbacks.h.desktop-clicks 2006-09-10 00:38:29.000000000 -0400 ++++ gnome-applets-2.16.0.1/stickynotes/stickynotes_applet_callbacks.h 2006-09-10 00:36:34.000000000 -0400 +@@ -29,6 +29,7 @@ + gboolean applet_focus_cb(GtkWidget *widget, GdkEventFocus *event, StickyNotesApplet *applet); + gboolean applet_save_cb(StickyNotesApplet *applet); + gboolean applet_check_click_on_desktop_cb (gpointer data); ++void install_check_click_on_desktop (void); + void applet_change_orient_cb(PanelApplet *panel_applet, PanelAppletOrient orient, StickyNotesApplet *applet); + void applet_size_allocate_cb(GtkWidget *widget, GtkAllocation *allocation, StickyNotesApplet *applet); + void applet_change_bg_cb (PanelApplet *panel_applet, +@@ -37,7 +38,6 @@ + GdkPixmap *pixmap, + StickyNotesApplet *applet); + void applet_destroy_cb (PanelApplet *panel_applet, StickyNotesApplet *applet); +- + /* Callbacks for sticky notes applet menu */ + void menu_create_cb(BonoboUIComponent *uic, StickyNotesApplet *applet, const gchar *verbname); + void menu_new_note_cb(BonoboUIComponent *uic, StickyNotesApplet *applet, const gchar *verbname); +--- gnome-applets-2.16.0.1/stickynotes/stickynotes_applet.c.desktop-clicks 2006-09-10 00:38:52.000000000 -0400 ++++ gnome-applets-2.16.0.1/stickynotes/stickynotes_applet.c 2006-09-10 00:36:47.000000000 -0400 +@@ -186,7 +186,7 @@ + } + g_timeout_add (1000 * 60 * timeout, + (GSourceFunc) applet_save_cb, NULL); +- g_timeout_add (100, applet_check_click_on_desktop_cb, NULL); ++ install_check_click_on_desktop (); + } + + /* Initialize Sticky Notes Icons */ +--- gnome-applets-2.16.0.1/stickynotes/stickynotes_applet_callbacks.c.desktop-clicks 2006-09-10 00:38:42.000000000 -0400 ++++ gnome-applets-2.16.0.1/stickynotes/stickynotes_applet_callbacks.c 2006-09-10 00:36:34.000000000 -0400 +@@ -178,6 +178,31 @@ + return TRUE; + } + ++static GdkFilterReturn desktop_window_event_filter (GdkXEvent *xevent, ++ GdkEvent *event, ++ gpointer data) ++{ ++ if ((((XEvent*)xevent)->xany.type == PropertyNotify) && ++ (((XEvent*)xevent)->xproperty.atom == gdk_x11_get_xatom_by_name ("_NET_WM_USER_TIME"))) { ++ stickynote_show_notes (FALSE); ++ } ++} ++ ++void install_check_click_on_desktop (void) ++{ ++ Window desktop_window; ++ GdkWindow *window; ++ ++ if (!get_desktop_window (&desktop_window)) { ++ return; ++ } ++ ++ window = gdk_window_foreign_new (desktop_window); ++ gdk_window_set_events (window, GDK_PROPERTY_CHANGE_MASK); ++ ++ gdk_window_add_filter (window, desktop_window_event_filter, NULL); ++} ++ + /* Applet Callback : Change the panel orientation. */ + void applet_change_orient_cb(PanelApplet *panel_applet, PanelAppletOrient orient, StickyNotesApplet *applet) + { |