rpms/lxpanel/devel lxpanel-0.5.4.1-blink-autohide.patch, NONE, 1.1 lxpanel-0.5.4.1-flaky-raise-bug.patch, NONE, 1.1 lxpanel-0.5.4.1-remove-debugging-output.patch, NONE, 1.1 lxpanel.spec, 1.28, 1.29
Christoph Wickert
cwickert at fedoraproject.org
Sun Jan 31 01:28:41 UTC 2010
- Previous message: File soprano-20100130svn.tar.bz2 uploaded to lookaside cache by rdieter
- Next message: rpms/lxpanel/F-11 lxpanel-0.5.4-default.patch, NONE, 1.1 lxpanel-0.5.4.1-blink-autohide.patch, NONE, 1.1 lxpanel-0.5.4.1-flaky-raise-bug.patch, NONE, 1.1 lxpanel-0.5.4.1-remove-debugging-output.patch, NONE, 1.1 .cvsignore, 1.13, 1.14 lxpanel.spec, 1.21, 1.22 sources, 1.13, 1.14 lxpanel-default.patch, 1.7, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: cwickert
Update of /cvs/pkgs/rpms/lxpanel/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv28565
Modified Files:
lxpanel.spec
Added Files:
lxpanel-0.5.4.1-blink-autohide.patch
lxpanel-0.5.4.1-flaky-raise-bug.patch
lxpanel-0.5.4.1-remove-debugging-output.patch
Log Message:
* Sun Jan 31 2010 Christoph Wickert <cwickert at fedoraproject.org> - 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
lxpanel-0.5.4.1-blink-autohide.patch:
panel.c | 31 +++++++++++++++++++++++++------
1 file changed, 25 insertions(+), 6 deletions(-)
--- NEW FILE lxpanel-0.5.4.1-blink-autohide.patch ---
--- 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;
}
lxpanel-0.5.4.1-flaky-raise-bug.patch:
taskbar.c | 38 ++++++++++++++++++++++++++------------
1 file changed, 26 insertions(+), 12 deletions(-)
--- NEW FILE lxpanel-0.5.4.1-flaky-raise-bug.patch ---
--- 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)
lxpanel-0.5.4.1-remove-debugging-output.patch:
menu-policy.c | 1 -
1 file changed, 1 deletion(-)
--- NEW FILE lxpanel-0.5.4.1-remove-debugging-output.patch ---
--- 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);
}
Index: lxpanel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/lxpanel/devel/lxpanel.spec,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -p -r1.28 -r1.29
--- lxpanel.spec 16 Dec 2009 09:15:21 -0000 1.28
+++ lxpanel.spec 31 Jan 2010 01:28:41 -0000 1.29
@@ -3,15 +3,22 @@
Name: lxpanel
Version: 0.5.4.1
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: A lightweight X11 desktop panel
Group: User Interface/Desktops
License: GPLv2+
URL: http://lxde.sourceforge.net/
Source0: http://downloads.sourceforge.net/sourceforge/lxde/%{name}-%{version}.tar.gz
-Patch0: lxpanel-0.5.4-default.patch
-Patch1: lxpanel-0.3.8.1-nm-connection-editor.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
@@ -45,8 +52,11 @@ developing applications that use %{name}
%prep
%setup -q
-%patch0 -p1 -b .default
-%patch1 -p1 -b .system-config-network
+%patch0 -p2 -b .flaky-raise
+%patch1 -p2 -b .debug
+%patch2 -p2 -b .blink
+%patch10 -p1 -b .default
+%patch11 -p1 -b .system-config-network
%build
@@ -78,6 +88,11 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/pkgconfig/lxpanel.pc
%changelog
+* Sun Jan 31 2010 Christoph Wickert <cwickert at fedoraproject.org> - 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 <cwickert at fedoraproject.org> - 0.5.4.1-1
- Update to 0.5.4.1
- Remove upstreamed patches
- Previous message: File soprano-20100130svn.tar.bz2 uploaded to lookaside cache by rdieter
- Next message: rpms/lxpanel/F-11 lxpanel-0.5.4-default.patch, NONE, 1.1 lxpanel-0.5.4.1-blink-autohide.patch, NONE, 1.1 lxpanel-0.5.4.1-flaky-raise-bug.patch, NONE, 1.1 lxpanel-0.5.4.1-remove-debugging-output.patch, NONE, 1.1 .cvsignore, 1.13, 1.14 lxpanel.spec, 1.21, 1.22 sources, 1.13, 1.14 lxpanel-default.patch, 1.7, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list