Don't calculate the main window monitor every time it`s needed
The main monitor of a window is maintained as 'window->monitor' and is updated when the window is resized or moved. Lets avoid calculating it every time it`s needed. https://bugzilla.gnome.org/show_bug.cgi?id=744934
This commit is contained in:
@ -288,8 +288,7 @@ windows_on_different_monitor (MetaWindow *a,
|
||||
if (a->screen != b->screen)
|
||||
return TRUE;
|
||||
|
||||
return meta_screen_get_monitor_for_window (a->screen, a) !=
|
||||
meta_screen_get_monitor_for_window (b->screen, b);
|
||||
return a->monitor != b->monitor;
|
||||
}
|
||||
|
||||
/* Get layer ignoring any transient or group relationships */
|
||||
|
Reference in New Issue
Block a user