window: Pass flag to meta_window_update_monitor() instead of bool
The bool determines whether the call was directly from a user operation or not. To add more state into the call without having to add more boolenas, change the boolean to a flag (so far with 'none' and 'user-op' as possible values). No functional changes were made. https://gitlab.gnome.org/GNOME/mutter/issues/192
This commit is contained in:
@@ -371,8 +371,8 @@ scale_rect_size (MetaRectangle *rect,
|
||||
}
|
||||
|
||||
static void
|
||||
meta_window_wayland_update_main_monitor (MetaWindow *window,
|
||||
gboolean user_op)
|
||||
meta_window_wayland_update_main_monitor (MetaWindow *window,
|
||||
MetaWindowUpdateMonitorFlags flags)
|
||||
{
|
||||
MetaBackend *backend = meta_get_backend ();
|
||||
MetaMonitorManager *monitor_manager =
|
||||
@@ -392,7 +392,7 @@ meta_window_wayland_update_main_monitor (MetaWindow *window,
|
||||
toplevel_window = meta_wayland_surface_get_toplevel_window (window->surface);
|
||||
if (toplevel_window != window)
|
||||
{
|
||||
meta_window_update_monitor (toplevel_window, user_op);
|
||||
meta_window_update_monitor (window, flags);
|
||||
window->monitor = toplevel_window->monitor;
|
||||
return;
|
||||
}
|
||||
@@ -413,7 +413,7 @@ meta_window_wayland_update_main_monitor (MetaWindow *window,
|
||||
return;
|
||||
}
|
||||
|
||||
if (!user_op)
|
||||
if (flags & META_WINDOW_UPDATE_MONITOR_FLAGS_USER_OP)
|
||||
{
|
||||
window->monitor = to;
|
||||
return;
|
||||
|
Reference in New Issue
Block a user