Package: xfce4-panel
Version: 4.10.0-1.1
Severity: wishlist
When windows button is configured to not show windows from all viewport/
workspace, attention window from other workspace/viewport is not shown.
Behavior like gnome that shows attention window would be more useful.
I attached a patch to implement:
* show attention from other viewport/workspace
* use bold font when window demands attention
* show attention even on active window
The last one is normally not useful, but I found one particular use when
ssh to compile in another tab, using these script, I can force attention:
# turn on with WINDOWID
xprop -id NNNN -f _NET_WM_STATE 32a -set _NET_WM_STATE
_NET_WM_STATE_DEMANDS_ATTENTION
# turn off with WINDOWID or just minimize and restore
xprop -id NNNN -f _NET_WM_STATE 32a -set _NET_WM_STATE ""
-- System Information:
Debian Release: 7.0
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'testing'), (400, 'unstable'),
(300, 'stable'), (200, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.2.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages xfce4-panel depends on:
ii exo-utils 0.10.2-1
ii libatk1.0-0 2.4.0-2
ii libc6 2.13-37
ii libcairo2 1.12.2-2
ii libdbus-1-3 1.6.8-1
ii libdbus-glib-1-2 0.100-1
ii libexo-1-0 0.10.2-1
ii libfontconfig1 2.9.0-7.1
ii libfreetype6 2.4.9-1.1
ii libgarcon-1-0 0.2.0-1
ii libgdk-pixbuf2.0-0 2.26.1-1
ii libglib2.0-0 2.33.12+really2.32.4-3
ii libgtk2.0-0 2.24.10-2
ii libice6 2:1.0.8-2
ii libpango1.0-0 1.30.0-1
ii libsm6 2:1.2.1-2
ii libwnck22 2.30.7-1
ii libx11-6 2:1.5.0-1
ii libxext6 2:1.3.1-2
ii libxfce4ui-1-0 4.10.0-1
ii libxfce4util6 4.10.0-2
ii libxfconf-0-2 4.10.0-1
ii multiarch-support 2.13-37
xfce4-panel recommends no packages.
xfce4-panel suggests no packages.
-- no debconf information
---
plugins/tasklist/tasklist-widget.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
Index: xfce4-panel-4.10.0/plugins/tasklist/tasklist-widget.c
===================================================================
--- xfce4-panel-4.10.0.orig/plugins/tasklist/tasklist-widget.c
+++ xfce4-panel-4.10.0/plugins/tasklist/tasklist-widget.c
@@ -310,7 +310,8 @@ static void xfce_tasklist_
/* tasklist buttons */
static inline gboolean xfce_tasklist_button_visible (XfceTasklistChild *child,
- WnckWorkspace *active_ws);
+ WnckWorkspace *active_ws,
+ gboolean allow_attention);
static gint xfce_tasklist_button_compare (gconstpointer child_a,
gconstpointer child_b,
gpointer user_data);
@@ -1565,7 +1566,7 @@ xfce_tasklist_active_workspace_changed (
if (child->type != CHILD_TYPE_GROUP)
{
- if (xfce_tasklist_button_visible (child, active_ws))
+ if (xfce_tasklist_button_visible (child, active_ws, TRUE /* allow_attention */))
gtk_widget_show (child->button);
else
gtk_widget_hide (child->button);
@@ -1604,7 +1605,7 @@ xfce_tasklist_window_added (WnckScreen
child = xfce_tasklist_button_new (window, tasklist);
/* initial visibility of the function */
- if (xfce_tasklist_button_visible (child, wnck_screen_get_active_workspace (screen)))
+ if (xfce_tasklist_button_visible (child, wnck_screen_get_active_workspace (screen), TRUE /* allow_attention */))
gtk_widget_show (child->button);
if (G_LIKELY (child->class_group != NULL))
@@ -2196,7 +2197,8 @@ xfce_tasklist_wireframe_update (XfceTask
**/
static inline gboolean
xfce_tasklist_button_visible (XfceTasklistChild *child,
- WnckWorkspace *active_ws)
+ WnckWorkspace *active_ws,
+ gboolean allow_attention)
{
XfceTasklist *tasklist = XFCE_TASKLIST (child->tasklist);
gint x, y, w, h;
@@ -2217,6 +2219,8 @@ xfce_tasklist_button_visible (XfceTaskli
}
if (tasklist->all_workspaces
+ || (active_ws != NULL && allow_attention &&
+ wnck_window_or_transient_needs_attention (child->window))
|| (active_ws != NULL
&& (G_UNLIKELY (wnck_workspace_is_virtual (active_ws))
? wnck_window_is_in_viewport (child->window, active_ws)
@@ -2491,10 +2495,34 @@ xfce_tasklist_button_state_changed (Wnck
|| PANEL_HAS_FLAG (changed_state, WNCK_WINDOW_STATE_URGENT))
{
/* only start blinking if the window requesting urgentcy
- * notification is not the active window */
+ * notification is not already blinking */
blink = wnck_window_or_transient_needs_attention (window);
- if (!blink || (blink && !wnck_window_is_active (window)))
- xfce_arrow_button_set_blinking (XFCE_ARROW_BUTTON (child->button), blink);
+ if (!blink || (blink && !xfce_arrow_button_get_blinking (XFCE_ARROW_BUTTON (child->button))))
+ {
+ /* show/hide button (from other workspace/viewport) */
+ tasklist = XFCE_TASKLIST (child->tasklist);
+ screen = tasklist->screen;
+ if (!tasklist->all_workspaces)
+ {
+ /* active window must deactivate first otherwise won't flash */
+ if (blink && !xfce_tasklist_button_visible (child, wnck_screen_get_active_workspace (screen), FALSE /* allow_attention */))
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (child->button), FALSE);
+ xfce_tasklist_active_workspace_changed (screen, NULL, tasklist);
+ }
+
+ /* toggle label bold */
+ if (tasklist->show_labels)
+ {
+ PangoFontDescription *font_desc;
+
+ font_desc = pango_font_description_new ();
+ pango_font_description_set_weight (font_desc, blink ? PANGO_WEIGHT_BOLD : PANGO_WEIGHT_NORMAL);
+ gtk_widget_modify_font (child->label, font_desc);
+ pango_font_description_free (font_desc);
+ }
+
+ xfce_arrow_button_set_blinking (XFCE_ARROW_BUTTON (child->button), blink);
+ }
}
}
@@ -2534,7 +2562,7 @@ xfce_tasklist_button_geometry_changed2 (
{
/* check if we need to change the visibility of the button */
active_ws = wnck_screen_get_active_workspace (child->tasklist->screen);
- if (xfce_tasklist_button_visible (child, active_ws))
+ if (xfce_tasklist_button_visible (child, active_ws, TRUE /* allow_attention */))
gtk_widget_show (child->button);
else
gtk_widget_hide (child->button);
_______________________________________________
Pkg-xfce-devel mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-xfce-devel