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 314697 - Should focus and raise windows on shift,alt,ctrl+click (w/ button=1,2,3), not just unmodified or alt+left-click
Should focus and raise windows on shift,alt,ctrl+click (w/ button=1,2,3), not...
Status: RESOLVED FIXED
Product: metacity
Classification: Other
Component: general
2.11.x
Other All
: Normal minor
: ---
Assigned To: Metacity maintainers list
Metacity maintainers list
Depends on:
Blocks: 155452
 
 
Reported: 2005-08-28 11:46 UTC by Andrés G. Aragoneses (IRC: knocte)
Modified: 2007-01-05 13:30 UTC
See Also:
GNOME target: ---
GNOME version: 2.11/2.12



Description Andrés G. Aragoneses (IRC: knocte) 2005-08-28 11:46:54 UTC
Steps to reproduce:
1. Open a nautilus window that shows some files.
2. Select "Show as list" visualization.
3. Select a file (let's call it file 'X') with the focus (clicking with the
left-button of the mouse, for example) and keep it selected.
4. Open another nautilus window so as to send to it the new focus.
5. Resize the second nautilus window so as to see the first window behind it.
6. Now the situation is: the first window has a file selected but has not the
focus, because the second window has the focus.
7. Press Shift key and hold it, so as to select more than one file in the first
window.
8. While Shift key is pressed, click on another file (let's call it file 'Z') in
the first window like if you wanted to select some files (files 'X', 'Y', 'Z').

Actual results: nothing happen.

Expected results:
Nautilus should send the focus back again to the first window and select the
three files.

Other information:
Comment 1 Christian Neumair 2005-09-01 22:44:46 UTC
Thanks for your bug report!
I can verify this issue and think the reason is that metacity uses the shift
modifier as a flag that the clicked window should not be raised. I wonder
whether that modifier should be passed to the window or not.
Comment 2 Elijah Newren 2005-09-03 17:13:00 UTC
Odd, somehow the code must not be going through the following check in
src/display.c: 
          if (unmodified ||
              event->xbutton.button == 1)
We also fail to focus & raise on ctrl+click.  However, it's more than just this
because we also fail for button 2 and 3 as well.  In fact, we also fail to raise
on alt+middle-click and alt+right-click.  This is all totally inconsistent with
the general rationale for raising on click ("users don't like interacting with
obscured windows").
Comment 3 Andrés G. Aragoneses (IRC: knocte) 2005-09-29 19:40:03 UTC
With Gnome 2.12 (SUSE 10.0 RC1) symptoms have changed.

Now, when the steps indicated are followed (pressing SHIFT key while clicking on
a file that is on an unfocused window), the files get selected correctly, but
the window doesn't get the focus. So I think this bug is *half* fixed.
Comment 4 Elijah Newren 2006-01-14 22:32:37 UTC
Did a little debugging -- our grab for ButtonPress (meta_change_button_grab() called from meta_display_grab_window_buttons()) only includes the alt modifier so metacity is never notified about any of the other kinds of clicks.  So, we'll probably have to include more modifiers and then also add manually handling for them in the ButtonPress case of display.c:event_callback().  Don't have the time for it now but didn't want to forget this.
Comment 5 Andrés G. Aragoneses (IRC: knocte) 2007-01-05 13:30:40 UTC
Good news! I have been tested this on Nautilus 2.16.1 and I am no longer able to reproduce the bug, so I am closing it.