After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 603516 - [PATCH] libwnck: Don't attempt to change workspace for pinned windows
[PATCH] libwnck: Don't attempt to change workspace for pinned windows
Status: RESOLVED FIXED
Product: libwnck
Classification: Core
Component: general
2.28.x
Other Linux
: Normal minor
: ---
Assigned To: libwnck maintainers
libwnck maintainers
Depends on:
Blocks:
 
 
Reported: 2009-12-01 19:06 UTC by Andrew Eikum
Modified: 2010-03-09 01:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[PATCH] libwnck: Don't attempt to change workspace for pinned windows (1.09 KB, text/plain)
2009-12-01 19:06 UTC, Andrew Eikum
Details

Description Andrew Eikum 2009-12-01 19:06:17 UTC
Created attachment 148846 [details]
[PATCH] libwnck: Don't attempt to change workspace for pinned windows

I found a minor, but annoying, bug in XFCE's Task List panel plugin,
where window entries in the task list would lose their pinned status if
the order of the items in the list were changed (via drag-drop).  I
traced the root cause to libwnck's wnck_window_move_to_workspace, which
would always cause a window to become a member of the current workspace,
regardless of its pinned status.

Attached is a patch to do nothing if a window is pinned.  I think this
makes sense logically: if a window is on all workspaces, what sense does
it make to 'move' it to another workspace?

This could cause user-visible changes (such as moving a pinned
window to another workspace via drag-drop on a panel workspace viewer
plugin "failing" to unpin the window), but I think it is more correct
for those other projects to first unpin the window, and then invoke the
move, if that is what is desired.  This allows for more fine-grained control over what behavior the user wants.

If this patch is rejected as too user-visible, perhaps a more acceptable
fix would be a check for the window's pinned status before the call to
wnck_window_move_to_workspace, around tasklist.c:3659.
Comment 1 Vincent Untz 2010-03-09 01:21:58 UTC
Hrm, it's a hard case. But I think I disagree: if you call wnck_window_move_to_workspace(), then it means you want the window to move to a specific workspace, and not to have it in the current workspace anymore. So having this result in unpinning the window feels right to me.

Take a pager for example: if you drag a window and move it to another workspace, you definitely don't expect it to stay on your correct workspace.

So I would think it's rather bug in the tasklist. I've fixed this (assuming XFCE uses WnckTasklist).