From 5b26897d516f9d4ec2f7a9bebdc67b718a23cc9b Mon Sep 17 00:00:00 2001 From: Christoph Wickert Date: Jan 31 2010 01:37:54 +0000 Subject: - Fix windows Raise/Focus problem - Make autohidden panels blink when there is a popup from a systray icon - Remove debugging output --- diff --git a/.cvsignore b/.cvsignore index 7996be9..0a7e579 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -lxpanel-0.4.1.tar.gz +lxpanel-0.5.4.1.tar.gz diff --git a/lxpanel-0.5.4-default.patch b/lxpanel-0.5.4-default.patch new file mode 100644 index 0000000..44e4f33 --- /dev/null +++ b/lxpanel-0.5.4-default.patch @@ -0,0 +1,25 @@ +--- lxpanel-0.5.4.orig/data/default/panels/panel.in 2009-04-20 17:07:32.000000000 +0200 ++++ lxpanel-0.5.4/data/default/panels/panel.in 2009-12-12 02:18:21.000000000 +0100 +@@ -50,13 +50,10 @@ + type = launchbar + Config { + Button { +- id=pcmanfm.desktop +- } +- Button { + id=gnome-terminal.desktop + } + Button { +- id=firefox.desktop ++ id=mozilla-firefox.desktop + } + } + } +@@ -73,6 +70,7 @@ + Config { + Button1=iconify + Button2=shade ++ Toggle=1 + } + } + diff --git a/lxpanel-0.5.4.1-blink-autohide.patch b/lxpanel-0.5.4.1-blink-autohide.patch new file mode 100644 index 0000000..4cf0528 --- /dev/null +++ b/lxpanel-0.5.4.1-blink-autohide.patch @@ -0,0 +1,57 @@ +--- trunk/lxpanel/src/panel.c 2010/01/30 21:28:31 2314 ++++ trunk/lxpanel/src/panel.c 2010/01/30 23:52:56 2315 +@@ -819,29 +819,48 @@ + + static gboolean panel_leave_real(Panel *p) + { ++ /* If the pointer is grabbed by this application, leave the panel displayed. ++ * There is no way to determine if it is grabbed by another application, such as an application that has a systray icon. */ + if (gdk_display_pointer_is_grabbed(p->display)) + return TRUE; + ++ /* If the pointer is inside the panel, leave the panel displayed. */ + gint x, y; + gdk_display_get_pointer(p->display, NULL, &x, &y, NULL); + if ((p->cx <= x) && (x <= (p->cx + p->cw)) && (p->cy <= y) && (y <= (p->cy + p->ch))) + return TRUE; + ++ /* If the panel is configured to autohide and if it is visible, hide the panel. */ + if ((p->autohide) && (p->visible)) + panel_set_visibility(p, FALSE); + ++ /* Clear the timer. */ + p->hide_timeout = 0; + return FALSE; + } + + static gboolean panel_enter(GtkImage *widget, GdkEventCrossing *event, Panel *p) + { +- if (p->hide_timeout) +- return FALSE; +- +- p->hide_timeout = g_timeout_add(500, (GSourceFunc) panel_leave_real, p); +- +- panel_set_visibility(p, TRUE); ++ /* We may receive multiple enter-notify events when the pointer crosses into the panel. ++ * Do extra tests to make sure this does not cause misoperation such as blinking. ++ * If the pointer is inside the panel, unhide it. */ ++ gint x, y; ++ gdk_display_get_pointer(p->display, NULL, &x, &y, NULL); ++ if ((p->cx <= x) && (x <= (p->cx + p->cw)) && (p->cy <= y) && (y <= (p->cy + p->ch))) ++ { ++ /* If the pointer is inside the panel and we have not already unhidden it, do so and ++ * set a timer to recheck it in a half second. */ ++ if (p->hide_timeout == 0) ++ { ++ p->hide_timeout = g_timeout_add(500, (GSourceFunc) panel_leave_real, p); ++ panel_set_visibility(p, TRUE); ++ } ++ } ++ else ++ { ++ /* If the pointer is not inside the panel, simulate a timer expiration. */ ++ panel_leave_real(p); ++ } + return TRUE; + } + diff --git a/lxpanel-0.5.4.1-flaky-raise-bug.patch b/lxpanel-0.5.4.1-flaky-raise-bug.patch new file mode 100644 index 0000000..c10e5c2 --- /dev/null +++ b/lxpanel-0.5.4.1-flaky-raise-bug.patch @@ -0,0 +1,90 @@ +--- trunk/lxpanel/src/plugins/taskbar.c 2010/01/30 15:32:22 2313 ++++ trunk/lxpanel/src/plugins/taskbar.c 2010/01/30 21:28:31 2314 +@@ -110,6 +110,7 @@ + int task_width_max; /* Maximum width of a taskbar button in horizontal orientation */ + int spacing; /* Spacing between taskbar buttons */ + gboolean use_net_active; /* NET_WM_ACTIVE_WINDOW is supported by the window manager */ ++ gboolean net_active_checked; /* True if use_net_active is valid */ + } TaskbarPlugin; + + static gchar *taskbar_rc = "style 'taskbar-style'\n" +@@ -185,6 +186,7 @@ + static void menu_move_to_workspace(GtkWidget * widget, TaskbarPlugin * tb); + static void menu_close_window(GtkWidget * widget, TaskbarPlugin * tb); + static void taskbar_make_menu(TaskbarPlugin * tb); ++static void taskbar_window_manager_changed(GdkScreen * screen, TaskbarPlugin * tb); + static void taskbar_build_gui(Plugin * p); + static int taskbar_constructor(Plugin * p, char ** fp); + static void taskbar_destructor(Plugin * p); +@@ -1006,6 +1008,15 @@ + if ((tk->desktop != -1) && (tk->desktop != tk->tb->current_desktop)) + Xclimsg(GDK_ROOT_WINDOW(), a_NET_CURRENT_DESKTOP, tk->desktop, 0, 0, 0, 0); + ++ /* Evaluate use_net_active if not yet done. */ ++ if ( ! tk->tb->net_active_checked) ++ { ++ TaskbarPlugin * tb = tk->tb; ++ GdkAtom net_active_atom = gdk_x11_xatom_to_atom(a_NET_ACTIVE_WINDOW); ++ tb->use_net_active = gdk_x11_screen_supports_net_wm_hint(gtk_widget_get_screen(tb->plug->pwid), net_active_atom); ++ tb->net_active_checked = TRUE; ++ } ++ + /* Raise the window. We can use NET_ACTIVE_WINDOW if the window manager supports it. + * Otherwise, do it the old way with XMapRaised and XSetInputFocus. */ + if (tk->tb->use_net_active) +@@ -1017,8 +1028,13 @@ + gdk_window_show(gdkwindow); + else + XMapRaised(GDK_DISPLAY(), tk->win); +- XSync(GDK_DISPLAY(), False); /* This we need to avoid BadMatch */ +- XSetInputFocus(GDK_DISPLAY(), tk->win, RevertToNone, time); ++ ++ /* There is a race condition between the X server actually executing the XMapRaised and this code executing XSetInputFocus. ++ * If the window is not viewable, the XSetInputFocus will fail with BadMatch. */ ++ XWindowAttributes attr; ++ XGetWindowAttributes(GDK_DISPLAY(), tk->win, &attr); ++ if (attr.map_state == IsViewable) ++ XSetInputFocus(GDK_DISPLAY(), tk->win, RevertToNone, time); + } + + /* Change viewport if needed. */ +@@ -1775,12 +1791,11 @@ + tb->menu = menu; + } + +-static void on_window_manager_changed(GdkScreen* screen, TaskbarPlugin* tb) ++/* Handler for "window-manager-changed" event. */ ++static void taskbar_window_manager_changed(GdkScreen * screen, TaskbarPlugin * tb) + { +- GdkAtom net_active_atom; +- GdkDisplay* display = gdk_screen_get_display(screen); +- net_active_atom = gdk_x11_xatom_to_atom(a_NET_ACTIVE_WINDOW); +- tb->use_net_active = gdk_x11_screen_supports_net_wm_hint(display, net_active_atom); ++ /* Force re-evaluation of use_net_active. */ ++ tb->net_active_checked = FALSE; + } + + /* Build graphic elements needed for the taskbar. */ +@@ -1822,8 +1837,8 @@ + * Number of desktops and edge is needed for this operation. */ + taskbar_make_menu(tb); + +- g_signal_connect(gtk_widget_get_screen(p->pwid), "window-manager-changed", G_CALLBACK(on_window_manager_changed), tb); +- on_window_manager_changed(gtk_widget_get_screen(p->pwid), tb); ++ /* Connect a signal to be notified when the window manager changes. This causes re-evaluation of the "use_net_active" status. */ ++ g_signal_connect(gtk_widget_get_screen(p->pwid), "window-manager-changed", G_CALLBACK(taskbar_window_manager_changed), tb); + } + + /* Plugin constructor. */ +@@ -1915,9 +1930,8 @@ + g_signal_handlers_disconnect_by_func(fbev, taskbar_net_number_of_desktops, tb); + g_signal_handlers_disconnect_by_func(fbev, taskbar_net_client_list, tb); + +- /* Remove 'window-manager-changed' handler */ +- g_signal_handlers_disconnect_by_func(gtk_widget_get_screen(p->pwid), +- on_window_manager_changed, tb); ++ /* Remove "window-manager-changed" handler. */ ++ g_signal_handlers_disconnect_by_func(gtk_widget_get_screen(p->pwid), taskbar_window_manager_changed, tb); + + /* Deallocate task list. */ + while (tb->task_list != NULL) diff --git a/lxpanel-0.5.4.1-remove-debugging-output.patch b/lxpanel-0.5.4.1-remove-debugging-output.patch new file mode 100644 index 0000000..106745d --- /dev/null +++ b/lxpanel-0.5.4.1-remove-debugging-output.patch @@ -0,0 +1,9 @@ +--- trunk/lxpanel/src/menu-policy.c 2010/01/30 15:32:22 2313 ++++ trunk/lxpanel/src/menu-policy.c 2010/01/30 21:28:31 2314 +@@ -50,6 +50,5 @@ + /* Evaluate the visibility of a menu item. */ + gboolean panel_menu_item_evaluate_visibility(MenuCacheItem * item, guint32 visibility_flags) + { +- g_debug("flags: %d\n", visibility_flags); + return menu_cache_app_get_is_visible(MENU_CACHE_APP(item), visibility_flags); + } diff --git a/lxpanel-default.patch b/lxpanel-default.patch deleted file mode 100644 index da1dafe..0000000 --- a/lxpanel-default.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff -up lxpanel-0.3.8.1/data/default/panels/panel.in.orig lxpanel-0.3.8.1/data/default/panels/panel.in ---- lxpanel-0.3.8.1/data/default/panels/panel.in.orig 2008-08-28 21:19:43.000000000 +0200 -+++ lxpanel-0.3.8.1/data/default/panels/panel.in 2008-08-28 21:20:00.000000000 +0200 -@@ -50,13 +50,10 @@ Plugin { - type = launchbar - Config { - Button { -- id=pcmanfm.desktop -- } -- Button { - id=gnome-terminal.desktop - } - Button { -- id=firefox.desktop -+ id=mozilla-firefox.desktop - } - } - } - diff --git a/lxpanel.spec b/lxpanel.spec index 24f6f47..1cfab2c 100644 --- a/lxpanel.spec +++ b/lxpanel.spec @@ -1,10 +1,8 @@ # Review Request: # https://bugzilla.redhat.com/show_bug.cgi?id=219930 -#define _default_patch_fuzz 0 - Name: lxpanel -Version: 0.4.1 +Version: 0.5.4.1 Release: 2%{?dist} Summary: A lightweight X11 desktop panel @@ -12,18 +10,21 @@ Group: User Interface/Desktops License: GPLv2+ URL: http://lxde.sourceforge.net/ Source0: http://downloads.sourceforge.net/sourceforge/lxde/%{name}-%{version}.tar.gz -Patch1: lxpanel-default.patch -Patch2: lxpanel-0.4.0-manpages.patch -Patch3: lxpanel-0.3.8.1-nm-connection-editor.patch -# http://sourceforge.net/tracker/?func=detail&aid=2800828&group_id=180858&atid=894871 -Patch4: lxpanel-0.4.1-cpu-history.patch +# http://lxde.svn.sourceforge.net/viewvc/lxde/trunk/lxpanel/src/plugins/taskbar.c?r1=2314&r2=2313&pathrev=2314 +Patch0: lxpanel-0.5.4.1-flaky-raise-bug.patch +# http://lxde.svn.sourceforge.net/viewvc/lxde/trunk/lxpanel/src/menu-policy.c?r1=2314&r2=2313&pathrev=2314 +Patch1: lxpanel-0.5.4.1-remove-debugging-output.patch +# http://lxde.svn.sourceforge.net/viewvc/lxde/trunk/lxpanel/src/panel.c?r1=2315&r2=2314&pathrev=2315 +Patch2: lxpanel-0.5.4.1-blink-autohide.patch +# distro specific patches +Patch10: lxpanel-0.5.4-default.patch +Patch11: lxpanel-0.3.8.1-nm-connection-editor.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) #BuildRequires: docbook-utils BuildRequires: gettext BuildRequires: gtk2-devel BuildRequires: intltool -#BuildRequires: libXmu-devel BuildRequires: libXpm-devel BuildRequires: startup-notification-devel # required for alsa mixer plugin @@ -43,7 +44,6 @@ Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: gtk2-devel Requires: libXpm-devel -#Requires: libXmu-devel %description devel The %{name}-devel package contains libraries and header files for @@ -52,10 +52,12 @@ developing applications that use %{name}. %prep %setup -q -%patch1 -p1 -b .default -%patch2 -p1 -b .manpage -%patch3 -p1 -b .system-config-network -%patch4 -p1 -b .history +%patch0 -p2 -b .flaky-raise +%patch1 -p2 -b .debug +%patch2 -p2 -b .blink +%patch10 -p1 -b .default +%patch11 -p1 -b .system-config-network + %build %configure @@ -86,6 +88,32 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/lxpanel.pc %changelog +* Sun Jan 31 2010 Christoph Wickert - 0.5.4.1-2 +- Fix windows Raise/Focus problem +- Make autohidden panels blink when there is a popup from a systray icon +- Remove debugging output + +* Wed Dec 16 2009 Christoph Wickert - 0.5.4.1-1 +- Update to 0.5.4.1 +- Remove upstreamed patches + +* Fri Dec 11 2009 Christoph Wickert - 0.5.4-1 +- Update to 0.5.4 +- Restore toggle functionality of the show deskop plugin + +* Thu Aug 06 2009 Christoph Wickert - 0.5.3-1 +- Update to 0.5.3, fixes vertical panel size (#515748) + +* Thu Aug 06 2009 Christoph Wickert - 0.5.2-1 +- Update to 0.5.2 + +* Sun Aug 02 2009 Christoph Wickert - 0.5.1-1 +- Update to 0.5.1 +- Remove cpu-history.patch and manpages.patch, fixed upstream + +- Thu Jul 27 2009 Christoph Wickert - 0.5.0-1 +- Update to 0.5.0 + * Sat Jul 25 2009 Christoph Wickert - 0.4.1-2 - Patch to fix CPU usage monitor history - Make netstatus plugin prefer nm-connetction-editor over system-config-network diff --git a/sources b/sources index 600a158..bcc46ea 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -cdc16f8126bc21c9a5f17f21433c1bf2 lxpanel-0.4.1.tar.gz +bdc0db6f692a7e13024cb17f9710bd6e lxpanel-0.5.4.1.tar.gz