GNOME Bugzilla – Bug 642591
Application launcher (Alt+F2) placed on wrong display in multihead setup
Last modified: 2012-06-09 03:07:30 UTC
Description of problem: When using multiple monitors and application launcher is opened by Alt+F2 shortcut, it always appears on a screen with some active windows, but the launched application itself appears on a screen with cursor. Version-Release number of selected component (if applicable): control-center-2.91.6-8.fc15.x86_64 How reproducible: 100% Steps to Reproduce: 1. Have at least two monitors, place some application window on one of them and cursor on the other one. 2. Press Alt+F2 (assuming there is default shortcut configuration) 3. Type name of some app (for example gedit) Actual results: Application launcher appears on screen with active window, the newly launched application (gedit) appears on the other screen with cursor. Expected results: They both should appear on the same screen (with cursor). Additional info: Observed on Fedora 15 Alpha / TC2
This bug still exists in gnome-shell 3.4.1
Created attachment 215893 [details] [review] show modal Dialogs on monitor with the mouse pointer I think the expected behaviour here is to show the dialog on the monitor containing the mouse pointer, rather than the monitor with active focused window. This is more inline with the behaviour seen when launching applications.
Review of attachment 215893 [details] [review]: global.screen.get_current_monitor() ?
Review of attachment 215893 [details] [review]: Remove focusMonitor/focusIndex from layout.js as well - this is the only place they're being used.
Created attachment 215908 [details] [review] remove focusMonitor/focusIndex as they are no longer needed.
Created attachment 215918 [details] [review] patch mutter to make meta_screen_get_current_monitor() public also get_current_monitor() now returns an index to be more consistent with the other API such as get_primary_monitor().
Created attachment 215919 [details] [review] show modal Dialogs on monitor with the mouse pointer use get_current_monitor() to get index of monitor to show the dialogs on.
Review of attachment 215919 [details] [review]: Did you test this? An integer shouldn't have 'x', 'y', 'width' and 'height' properties. :) This should be Main.layoutManager.monitors[global.screen.get_current_monitor()]; Maybe it's worth adding a get currentMonitor() { } property for it, similar to focusMonitor.
Review of attachment 215918 [details] [review]: Your commit message needs work. Try something like: screen: Add new public meta_screen_get_current_monitor API Similar to meta_screen_get_primary_monitor, this returns the index of the current monitor - the monitor the pointer is on. ::: src/core/screen.c @@ +2120,3 @@ g_queue_free (monitor_queue); } +const MetaMonitorInfo* Introduces trailing whitespace, and also missing leading and trailing newlines before and after the function. It also should have a doc comment describing that the current monitor is the monitor "the pointer" is on (oh boy, this is not going to work with XI2, is it)
Created attachment 215996 [details] [review] clean up whitespace and fixed commit message
Created attachment 215998 [details] [review] implement get currentMonitor property.
Created attachment 215999 [details] [review] rebased
Created attachment 216011 [details] [review] modalDialog: show dialogs on monitor with the mouse pointer Show the dialog on the monitor containing the pointer, rather than the monitor with active focused window. This brings it inline with the behaviour seen when launching applications. Remove the focusMonitor/focusIndex from LayoutManager. These properties were only used by the modal dialogs. Remove them since they are not being used elsewhere.
Created attachment 216012 [details] [review] screen: Add new public meta_screen_get_current_monitor API Similar to meta_screen_get_primary_monitor, this returns a monitor index. The monitor that the pointer is on. The previous private implementation has been renamed to meta_screen_get_current_monitor_info.
Review of attachment 216012 [details] [review]: Looks fine.
Review of attachment 216011 [details] [review]: This as well.
Comment on attachment 216012 [details] [review] screen: Add new public meta_screen_get_current_monitor API Attachment 216012 [details] pushed as 4595209 - screen: Add new public meta_screen_get_current_monitor API
Attachment 216011 [details] pushed as dc004f6 - modalDialog: show dialogs on monitor with the mouse pointer