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 112478 - alt-shift-leftclick should move window in "snap"-mode
alt-shift-leftclick should move window in "snap"-mode
Status: RESOLVED FIXED
Product: metacity
Classification: Other
Component: general
2.8.x
Other Linux
: Normal enhancement
: future
Assigned To: Metacity maintainers list
Metacity maintainers list
Depends on:
Blocks: 155457
 
 
Reported: 2003-05-07 11:17 UTC by erik
Modified: 2006-08-07 19:30 UTC
See Also:
GNOME target: ---
GNOME version: 2.9/2.10


Attachments
Grab button1 with ShiftMask | window_grab_modifiers as the modmask (2.12 KB, patch)
2006-06-08 16:07 UTC, Björn Lindqvist
committed Details | Review

Description erik 2003-05-07 11:17:14 UTC
Currently moving a window in snap-to-edge-mode (with alt-left-click) is a 
6 step process

* hold down alt
* left click on window and hold down
* hold down ctrl
* move window
* let go of mousebutton (must be done before letting go of ctrl)
* let go of ctrl and alt

If alt-shift-left could be used for moving a window in snap-mode it would
be a 4 step process

* hold down alt and ctrl
* left click on window and hold down
* move window
* let go of all buttons (at the same time)

This would feel alot more intuative and easy to use.

/Erik
Comment 1 Rob Adams 2003-05-07 15:11:13 UTC
Works for me...
Comment 2 Havoc Pennington 2003-05-07 16:18:01 UTC
The bug is that if you hold alt+shift then click, it doesn't work. 
You have to hold alt, then click, then press shift.

I fixed this for Alt+Shift+Tab a while back, just need to do the 
same kind of fix for alt+click
Comment 3 Rob Adams 2003-05-07 16:29:42 UTC
I just did it with both 2.4.34 and HEAD -- press alt+shift and then
click and drag.  Worked just fine.  Perhaps I'm somehow missing
something here?
Comment 4 Havoc Pennington 2003-05-07 16:31:49 UTC
Don't know - it doesn't work for me though. Needs investigation...
Comment 5 erik 2003-05-08 09:21:43 UTC
Can I help in any way? This is really annoying for me :)

/Erik
Comment 6 Havoc Pennington 2003-05-08 14:02:00 UTC
If you know C, you can look at the source and try to debug it.
Otherwise, no I don't think more info is needed.
Comment 7 Elijah Newren 2004-10-14 19:43:57 UTC
I can dupe.  Updating the version.
Comment 8 Charles R. Twardy 2005-02-22 22:28:25 UTC
I found this and Bug #81704 because I was annoyed that metacity didn't have
snapping/resistance. A friend said "Control" drag would do it, but it didn't.
Now I see here that Shift-Alt-drag enables snapping.

1) Discussion at Bug #81704 suggests that metacity should be incorporating
default snapping/resistance, following the admirable "just do the right thing"
approach. No need for weird keys. I'd recommend that instead.

2) The shift-alt snap-to is some of the most annoying behavior I have ever seen.
 If it's going to stay I think having to hit shift-alt is a good idea. Maybe
shift-alt-meta just to be safe? :-p
Comment 9 Elijah Newren 2005-09-04 16:38:59 UTC
Oops, this is a key/mouse binding issue, not a move/resize/constraints one. 
Updating the blocks field...
Comment 10 Alexander “weej” Jones 2005-11-20 17:37:22 UTC
Yeah I just got stung by this baby, keep selecting text by accident! :@
Comment 11 Björn Lindqvist 2006-06-08 16:07:45 UTC
Created attachment 66982 [details] [review]
Grab button1 with ShiftMask | window_grab_modifiers as the modmask

I think this patch should fix the problem. Basically, you just have to add a grab on left mouse button + Alt + Shift and everything works itself out automagically. I also found it necessary to change the while-loop in meta_display_grab_window_buttons to a for-loop. :)
Comment 12 Elijah Newren 2006-07-24 17:17:55 UTC
I committed the patch, adding a comment.  The patch does remove the need for getting shift and Button1 in the "right" order, but for some reason Alt still has to be first.  For some reason, Shift + Alt + Button1 won't work for me whereas Alt + Shift + Button1 will with this patch.  Doesn't make any sense to me.  Does anyone else understand that?
Comment 13 Björn Lindqvist 2006-08-03 17:30:23 UTC
I can't reproduce. I.e: holding Shift, then holding Alt then pressing Button1 gives the same effect as holding Alt, then holding Shift then pressing Button1.
Comment 14 Elijah Newren 2006-08-03 20:01:00 UTC
Weird, must have been something strange with the system I was using at home.  It works fine on my machine here at school.  So, want to have the pleasure of marking this one as fixed, Bjorn?
Comment 15 Elijah Newren 2006-08-07 19:30:40 UTC
Okay, I'll do it then.  :)  Thanks for fixing this Björn!