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 710610 - Cannot move application to another workspace when mirroring desktop
Cannot move application to another workspace when mirroring desktop
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: overview
3.10.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
: 646649 712178 721785 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-10-22 08:01 UTC by Petr Schindler
Modified: 2014-02-02 14:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
layout: Keep track of cloned monitors (1.63 KB, patch)
2014-01-11 10:36 UTC, drago01
reviewed Details | Review
workspacesView: Don't show views for cloned monitors (1.42 KB, patch)
2014-01-11 10:36 UTC, drago01
none Details | Review
monitor_manger: Don't create MonitorInfos for clones (2.57 KB, patch)
2014-02-02 10:09 UTC, drago01
none Details | Review
monitor_manger: Don't create MonitorInfos for clones (2.58 KB, patch)
2014-02-02 10:10 UTC, drago01
needs-work Details | Review
monitorManager: Fix logic bug in make_logical_config (1.08 KB, patch)
2014-02-02 14:11 UTC, drago01
committed Details | Review

Description Petr Schindler 2013-10-22 08:01:18 UTC
When I mirror desktop over two monitors (built-in and external one) I can't move applications to another workspace (in overview).

When I drag and drop application to another workspace it appears on the current one. This happens also when I drag&drop window from another workspace, it appears on the active workspace too.

Also when I drag window between two workspaces no new workspace appears.

See video attached.

Version: gnome-shell-3.10.1-1.fc20.x86_64

Fedora 20
Comment 1 drago01 2013-10-22 10:22:11 UTC
(In reply to comment #0)
> When I mirror desktop over two monitors (built-in and external one) I can't
> move applications to another workspace (in overview).
> 
> When I drag and drop application to another workspace it appears on the current
> one. This happens also when I drag&drop window from another workspace, it
> appears on the active workspace too.
> 
> Also when I drag window between two workspaces no new workspace appears.
> 
> See video attached.

There is no video.
Comment 2 Petr Schindler 2013-10-22 10:36:13 UTC
Oh, I'm sorry. It hadn't upload1ed due to the size of the video. You can find it here: http://pschindl.fedorapeople.org/Screencast%20from%2022.10.2013%2009:58:28.webm
Comment 3 drago01 2013-11-16 17:27:34 UTC
*** Bug 712178 has been marked as a duplicate of this bug. ***
Comment 4 Bazon 2013-11-17 05:34:53 UTC
Something I found out:
When moving the window to another workspace works (2nd monitor off), the function 

ThumbnailsBox.acceptDrop()

is called
When using monitor clone (or "mirror" as it is called here) setup, moving windows to another workspace doesn't work and instead 

Workspace.acceptDrop()

is called.

Also, the Workspace Thumbnails don't rearrange to allow dropping the window to create a new workspace.
Comment 5 Bazon 2013-11-17 12:22:08 UTC
Another observation:

I added in /usr/share/gnome-shell/js/ui/dnd.js:

    _dragActorDropped: function(event) {
        let [dropX, dropY] = event.get_coords();
        let target = this._dragActor.get_stage().get_actor_at_pos(Clutter.PickMode.ALL,
                                                                  dropX, dropY);
//added
log('target: ' + target);
....


When dragging works (single monitor), the output is:

target: [0x94fbc00 MetaBackgroundActor]

When dragging doesn't work (dual monitor clone), the output is:

target: [0x9979770 ClutterActor]

which is the same output as if it would be dropped outside of the workspace thumbnails.
Comment 6 Bazon 2013-11-18 16:56:01 UTC
And yet another observation:

In monitor clone/mirror mode, when you start the looking glass inspect-tool, the whole workspace-thumbnail view is only ONE "ClutterActor". 

In single monitor mode, the looking glass-inspector even identifies the window clones on the workspace-thumbnails.

And, equal worse:

The same goes for the DASH!

In monitor clone/mirror mode, the whole Dash is ONE ClutterActor for the looking glass inspector, in single monitor mode, every icon is different.

And that leads to the logical consequence:

You can't drag app-icons on the Dash in dual-monitor clone/mirror mode!

So I suppose, there should be an equivalent bug about the dash in dual--monitor clone/mirror mode, I try to search it and link it here.

Also, I propose to increase priority, as both drag window-to-workspace and drag app-icon-to-dash are important core-functions.
Comment 7 Jasper St. Pierre (not reading bugmail) 2013-11-18 16:58:14 UTC
So it seems that in the mirror mode, we have an erroneous actor covering large parts of the overview. Is this git master or 3.10? Can you see if:

https://git.gnome.org/browse/gnome-shell/commit/js/ui/workspacesView.js?id=d5cd534320b1ca86f2986191c2336eb8ab6b6cac

or similar commits in git master fix it?
Comment 8 Bazon 2013-11-18 17:29:02 UTC
For me, it's gnome-shell 3.10.2.1-1 in Arch Linux. 
(+ nvidia driver, if that matters.)

The version of workspacesView.js in the link doesn't fix it (yes, I did alt+F2 "r" after replacing the original in /usr/share/gnome-shell/js/ui/  ;-) ), it's the same behaviour as before, with the same large ClutterActor in the Looking-Glass-Inspector. 


I searched all bugs about the dash, couldn't find a report about this before, so I filed a new one:
https://bugzilla.gnome.org/show_bug.cgi?id=712615
(don't know whether tis is an duplicate then, you decide...)
Comment 9 Jasper St. Pierre (not reading bugmail) 2013-11-18 17:55:09 UTC
There have been lots of changes, so in order to test, you need to have a full jhbuild from git master. Simply copying the workspacesView.js isn't adequate enough to test.
Comment 10 Bazon 2013-11-18 18:41:41 UTC
OK, thanks for the information, when I got time, I try to learn how to make such build.
Comment 11 Florian Müllner 2013-11-18 18:48:24 UTC
FWIW, I can reproduce the issue here. For whatever reason, workspaces are stacked above dash/workspace switcher, but only in mirror mode.
Comment 12 drago01 2013-11-18 21:43:57 UTC
(In reply to comment #11)
> FWIW, I can reproduce the issue here. For whatever reason, workspaces are
> stacked above dash/workspace switcher, but only in mirror mode.

Hmm ... we is mirror mode even causing any changes? We should simply ignore mirrored monitors.
Comment 13 Bazon 2013-11-19 15:56:41 UTC
> Hmm ... we is mirror mode even causing any changes? We should simply ignore
> mirrored monitors.

Sounds reasonable. Has anybody a quick fix / workaround to achieve that? I'm using mirror mode very often and would be happy to avoid that problem.
Comment 14 donny 2013-12-03 05:48:21 UTC
This bug is quite annoying! Why it remain in an unconfirmed state?
Please help.
Comment 15 Bazon 2013-12-03 16:37:57 UTC
Good question. This is a real show stopper, as it mainly happens, when you present something to others. (clone-mode --> presentation!)


Meanwhile a workaround I didn't realize before, so maybe this is useful for someone:
Rightclick on titlebar, move to workspace....
works. Also on clone/mirror-mode.
Comment 16 Jasper St. Pierre (not reading bugmail) 2013-12-03 16:44:03 UTC
(In reply to comment #14)
> This bug is quite annoying! Why it remain in an unconfirmed state?

We don't differentiate between UNCONFIRMED and NEW. There's currently a request in to remove UNCOMFIRMED from the states in the gnome-shell product.

As for the bug, I don't have an extra monitor to test with right now. Other people might be able to debug better.
Comment 17 donny 2013-12-04 22:09:58 UTC
It's possible to emulate the presence of an external monitor with a kernel parameter:
video=conn:res[M][R][-bpp][@refresh][i][m][eDd]
where conn must match xrandr name

e.g.
video=VGA-1:1024x768e
for more info:
http://distro.ibiblio.org/fatdog/web/faqs/boot-options.html

Hope this help.
Comment 18 drago01 2014-01-10 17:46:39 UTC
*** Bug 721785 has been marked as a duplicate of this bug. ***
Comment 19 drago01 2014-01-11 10:36:07 UTC
Created attachment 265993 [details] [review]
layout: Keep track of cloned monitors

If a two (or more) monitors overlap completely
threat the one with the heigher index as
a clone of the other.
Comment 20 drago01 2014-01-11 10:36:14 UTC
Created attachment 265994 [details] [review]
workspacesView: Don't show views for cloned monitors

They are overlapped by the clone anyway, and cause all
sort of issues like broken dnd.
Comment 21 Jasper St. Pierre (not reading bugmail) 2014-01-17 14:26:46 UTC
Review of attachment 265993 [details] [review]:

I'd rather keep track of this in mutter's monitor manager. It seems like it would be useful to mutter as well, and XRandR might be able to tell us more than heuristics.
Comment 22 drago01 2014-02-02 09:29:21 UTC
*** Bug 646649 has been marked as a duplicate of this bug. ***
Comment 23 drago01 2014-02-02 10:09:41 UTC
Created attachment 267833 [details] [review]
monitor_manger: Don't create MonitorInfos for clones

The comment above MetaMonitorInfo reads:

"Clones are only reported once, irrespective
of the way they're implemented"

But that's not what the code does, so fix the code
to match to comment. The double reporting of clones
confuses gnome-shell and let it think that there are
multiple monitors while clones are effectivly one monitor.


---

Ok seems like mutter was not supposed to report clones as separate 
monitors via MetaScreen at all, but the code wasn't really working,
this fixes it.
Comment 24 drago01 2014-02-02 10:10:21 UTC
Created attachment 267834 [details] [review]
monitor_manger: Don't create MonitorInfos for clones

The comment above MetaMonitorInfo reads:

"Clones are only reported once, irrespective
of the way they're implemented"

But that's not what the code does, so fix the code
to match the comment. The double reporting of clones
confuses gnome-shell and let it think that there are
multiple monitors while clones are effectivly one monitor.
Comment 25 Jasper St. Pierre (not reading bugmail) 2014-02-02 13:29:50 UTC
Review of attachment 267834 [details] [review]:

Huh? We do this loop immediately above. We first go through all existing monitors and check if they have the same rectangle. Why isn't this working?
Comment 26 drago01 2014-02-02 14:11:45 UTC
Created attachment 267848 [details] [review]
monitorManager: Fix logic bug in make_logical_config

The code that prevents the creation of multiple MonitorInfos for clones
wasn't working due to using the wrong index when getting the already
created info so fix that to use the correct one.

---

OK this fixes the logic instead of reimplementing it.
Comment 27 Jasper St. Pierre (not reading bugmail) 2014-02-02 14:13:00 UTC
Review of attachment 267848 [details] [review]:

Good eye.
Comment 28 drago01 2014-02-02 14:14:55 UTC
Attachment 267848 [details] pushed as abebb47 - monitorManager: Fix logic bug in make_logical_config