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 657519 - window can be maximized to wrong display
window can be maximized to wrong display
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: Florian Müllner
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2011-08-27 17:20 UTC by Trevor Spiteri
Modified: 2011-10-18 01:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
tiling: for tiled maximization use tile_rect as target size/position (2.38 KB, patch)
2011-08-27 20:32 UTC, Rui Matos
none Details | Review
tiling: for tiled maximization use the tile area as target size/position (2.43 KB, patch)
2011-10-18 00:21 UTC, Rui Matos
committed Details | Review

Description Trevor Spiteri 2011-08-27 17:20:56 UTC
When I drag the title bar to the top, the display where the mouse pointer is is highlighted. When I release the mouse, the window maximizes to the display containing the largest portion of the window. These are not always the same.

Suppose I have two displays, and I am dragging a window from its top left corner. I move the mouse pointer to the top right (not completely right, that would trigger half-maximize not maximize) corner of my left display. My left display is highlighted, as I would expect, since the mouse pointer is in the left display. But when I release the mouse, the window maximizes to the right display, presumably because there is a larger portion of the window in the right display than in the left display.
Comment 1 Rui Matos 2011-08-27 17:41:47 UTC
I'm almost sure this another symptom of bug 642580. The patch on that bug should fix this one too. Can you give it a try and test?
Comment 2 Trevor Spiteri 2011-08-27 18:38:35 UTC
Sorry, I can't try the patch. But having had a look at the other bug (and patch), it seems to me to be unrelated. Unlike the other bug, this bug is easy to reproduce, so I guess anyone with the patch should not find it that hard to try it.
Comment 3 Rui Matos 2011-08-27 20:32:08 UTC
Created attachment 194940 [details] [review]
tiling: for tiled maximization use tile_rect as target size/position

When using more than one monitor, tiled maximization can be triggered with the
pointer in one monitor while most of the window area remains in another. This
means that the maximization constraint would maximize the window into the wrong
monitor as it uses the work area size/position as target.

Fix this by using the computed tile_rect on update_move() as target
size/position.

--

While the patch in bug 642580 doesn't fix this bug per se, it makes the fix
straight forward.
Comment 4 Rui Matos 2011-10-18 00:21:08 UTC
Created attachment 199289 [details] [review]
tiling: for tiled maximization use the tile area as target size/position

When using more than one monitor, tiled maximization can be triggered with the
pointer in one monitor while most of the window area remains in another. This
means that the maximization constraint would maximize the window into the wrong
monitor as it uses the work area size/position as target.

Fix this by using the current tile area as target size/position.
Comment 5 Florian Müllner 2011-10-18 01:10:22 UTC
Review of attachment 199289 [details] [review]:

Makes sense.
Comment 6 Rui Matos 2011-10-18 01:38:35 UTC
Attachment 199289 [details] pushed as c39129b - tiling: for tiled maximization use the tile area as target size/position