mirror of
https://github.com/brl/mutter.git
synced 2024-11-23 00:20:42 -05:00
wayland/surface: Notify highest scale monitor after updating window monitor
meta_window_update_monitor() can emit "::highest-scale-monitor-changed", and we connected to that signal right before. Let's avoid calling meta_wayland_surface_notify_highest_scale_monitor() twice and move the g_signal_connect() for that signal and the initial call to meta_wayland_surface_notify_highest_scale_monitor() to happen after meta_window_update_monitor(). Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3598>
This commit is contained in:
parent
0fc39b2a87
commit
a14200a75c
@ -139,12 +139,6 @@ meta_wayland_shell_surface_set_window (MetaWaylandShellSurface *shell_surface,
|
||||
|
||||
priv->window = window;
|
||||
|
||||
priv->highest_scale_monitor_handler_id =
|
||||
g_signal_connect_swapped (window, "highest-scale-monitor-changed",
|
||||
G_CALLBACK (meta_wayland_surface_notify_highest_scale_monitor),
|
||||
surface);
|
||||
meta_wayland_surface_notify_highest_scale_monitor (surface);
|
||||
|
||||
surface_actor = meta_wayland_surface_get_actor (surface);
|
||||
if (surface_actor)
|
||||
clutter_actor_set_reactive (CLUTTER_ACTOR (surface_actor), TRUE);
|
||||
@ -156,6 +150,12 @@ meta_wayland_shell_surface_set_window (MetaWaylandShellSurface *shell_surface,
|
||||
shell_surface);
|
||||
|
||||
meta_window_update_monitor (window, META_WINDOW_UPDATE_MONITOR_FLAGS_NONE);
|
||||
|
||||
priv->highest_scale_monitor_handler_id =
|
||||
g_signal_connect_swapped (window, "highest-scale-monitor-changed",
|
||||
G_CALLBACK (meta_wayland_surface_notify_highest_scale_monitor),
|
||||
surface);
|
||||
meta_wayland_surface_notify_highest_scale_monitor (surface);
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user