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 737178 - 'workspaces on primary display' setting is forgotten
'workspaces on primary display' setting is forgotten
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
3.13.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
: 736464 737349 738075 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2014-09-23 13:34 UTC by Cole Robinson
Modified: 2014-10-14 08:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
window: Be more careful when setting initial workspace state (1.88 KB, patch)
2014-09-25 10:56 UTC, Florian Müllner
needs-work Details | Review
window: Be more careful when setting initial workspace state (2.22 KB, patch)
2014-09-25 13:10 UTC, Florian Müllner
committed Details | Review
window: Always set workspace state while constructing (1.16 KB, patch)
2014-09-25 13:11 UTC, Florian Müllner
committed Details | Review

Description Cole Robinson 2014-09-23 13:34:46 UTC
See the attached video. Ignore the graphical corruption for now, I'll file a second bug about that.

I use a command line run of gnome-terminal to put a terminal on my second monitor. But when I switch workspaces, it switches that terminal as well. Open gnome-tweak-tools, verify 'workspaces on primary display only' is already selected, toggle the setting twice, and now everything is working as expected.

FWIW this worked on F21. Might seem like a contrived usecase, but I do that every day to run my todo list and a running status report on the second monitor.
Comment 1 Cole Robinson 2014-09-23 13:35:11 UTC
Sorry:

$ rpm -q gnome-shell
gnome-shell-3.13.92-1.fc21.x86_64
Comment 2 Cole Robinson 2014-09-23 13:37:29 UTC
Sorry, attachment was too big, give me a minute and I'll post a URL
Comment 4 Florian Müllner 2014-09-25 10:47:53 UTC
*** Bug 737349 has been marked as a duplicate of this bug. ***
Comment 5 Florian Müllner 2014-09-25 10:56:00 UTC
Created attachment 287059 [details] [review]
window: Be more careful when setting initial workspace state

A window may either be sticky because it has been requested as such,
or because it is placed on a non-primary monitor (and the corresponding
preference is set). While we do take the latter into account, we
currently override the sticky state later during initialization;
be a bit more careful there to get the initial state right.
Comment 6 Rui Matos 2014-09-25 12:49:37 UTC
Review of attachment 287059 [details] [review]:

::: src/core/window.c
@@ +1063,3 @@
   if (window->initial_workspace_set)
     {
       gboolean on_all_workspaces;

This variable might be uninitialized now
Comment 7 Florian Müllner 2014-09-25 13:10:57 UTC
Created attachment 287074 [details] [review]
window: Be more careful when setting initial workspace state

Fixed uninitialized variable.
Comment 8 Florian Müllner 2014-09-25 13:11:12 UTC
Created attachment 287075 [details] [review]
window: Always set workspace state while constructing

set_workspace_state () returns early when the desired sticky state
and workspace match the current property values, assuming that the
corresponding MRU lists are already correct in that case.
However that might not be the case when we are setting the initial
state, so don't take the shortcut in that case.
Comment 9 Rui Matos 2014-09-25 14:09:52 UTC
Review of attachment 287074 [details] [review]:

Looks fine now
Comment 10 Rui Matos 2014-09-25 14:14:47 UTC
Review of attachment 287075 [details] [review]:

Right, without this we'd never actually add the window to all workspaces initially in the meta_prefs_get_workspaces_only_on_primary() case
Comment 11 Florian Müllner 2014-09-25 14:17:00 UTC
Attachment 287074 [details] pushed as 2eec11b - window: Be more careful when setting initial workspace state
Attachment 287075 [details] pushed as 1e1ca47 - window: Always set workspace state while constructing
Comment 12 Florian Müllner 2014-10-07 11:40:55 UTC
*** Bug 738075 has been marked as a duplicate of this bug. ***
Comment 13 Florian Müllner 2014-10-14 08:42:15 UTC
*** Bug 736464 has been marked as a duplicate of this bug. ***