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 662270 - Window snapping buggy when using "shift" during move
Window snapping buggy when using "shift" during move
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
3.2.x
Other Linux
: Normal minor
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2011-10-20 06:51 UTC by Jan Rüegg
Modified: 2011-10-20 15:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Desktop after shift-snapping, no keyboard or mouse key pressed... (397.31 KB, image/png)
2011-10-20 06:51 UTC, Jan Rüegg
  Details
tiling: do not tile if moving in snap mode (1.34 KB, patch)
2011-10-20 14:45 UTC, Rui Matos
reviewed Details | Review
tiling: do not tile if moving in snap mode (1.36 KB, patch)
2011-10-20 15:14 UTC, Rui Matos
committed Details | Review

Description Jan Rüegg 2011-10-20 06:51:47 UTC
Created attachment 199502 [details]
Desktop after shift-snapping, no keyboard or mouse key pressed...

When pressing shift during a window move, then the window corners stick to other windows or borders of the screen. However, when moving a window entirely to the side and keep pressing shift, then the blue preview window shows.

When one now stops pressing the mouse button, the window does not resize, but the blue preview window stays without any mouse button or key pressed...

See screenshot, where I have one terminal in the background, so that one can better see the blue preview, and one terminal shift-moved to the extreme right.
Comment 1 Rui Matos 2011-10-20 14:45:43 UTC
Created attachment 199534 [details] [review]
tiling: do not tile if moving in snap mode

If we are moving in snap mode (shift pressed) we don't want to tile. We must
also cancel any pending tiling if snap mode is activated during the move drag.
Comment 2 Florian Müllner 2011-10-20 15:00:15 UTC
Review of attachment 199534 [details] [review]:

Looks about right; it's probably a bit cleaner to write

  if (foo && !bar)
    /* something */
  else if (bar)
    /* something else */

as

  if (bar)
    /* something else */
  else if (foo)
    /* something */

::: src/core/window.c
@@ +8487,3 @@
+  else if (snap)
+    {
+      window->tile_mode = META_TILE_NONE;

I think this could use a small comment; you should also reset tile_monitor_number ;-)
Comment 3 Rui Matos 2011-10-20 15:14:04 UTC
Created attachment 199537 [details] [review]
tiling: do not tile if moving in snap mode

Thanks for the review Florian!
Comment 4 Florian Müllner 2011-10-20 15:15:48 UTC
Review of attachment 199537 [details] [review]:

LGTM (note: I didn't actually test the patch)
Comment 5 Rui Matos 2011-10-20 15:21:56 UTC
Attachment 199537 [details] pushed as 6aa4bfd - tiling: do not tile if moving in snap mode