GNOME Bugzilla – Bug 314697
Should focus and raise windows on shift,alt,ctrl+click (w/ button=1,2,3), not just unmodified or alt+left-click
Last modified: 2007-01-05 13:30:40 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:
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.
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").
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.
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.
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.