mirror of
https://github.com/brl/mutter.git
synced 2025-07-28 12:38:04 +00:00
Stop using MetaScreen where it is unnecessary
https://bugzilla.gnome.org/show_bug.cgi?id=759538
This commit is contained in:

committed by
Jonas Ådahl

parent
b7c3dada81
commit
1d5e37050d
@@ -922,7 +922,6 @@ meta_window_calculate_main_logical_monitor (MetaWindow *window)
|
||||
|
||||
MetaWindow *
|
||||
_meta_window_shared_new (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindowClientType client_type,
|
||||
MetaWaylandSurface *surface,
|
||||
Window xwindow,
|
||||
@@ -961,9 +960,6 @@ _meta_window_shared_new (MetaDisplay *display,
|
||||
window->surface = surface;
|
||||
window->xwindow = xwindow;
|
||||
|
||||
/* this is in window->screen->display, but that's too annoying to
|
||||
* type
|
||||
*/
|
||||
window->display = display;
|
||||
meta_display_register_stamp (window->display, &window->stamp, window);
|
||||
|
||||
@@ -974,8 +970,6 @@ _meta_window_shared_new (MetaDisplay *display,
|
||||
window->sync_request_timeout_id = 0;
|
||||
window->sync_request_alarm = None;
|
||||
|
||||
window->screen = screen;
|
||||
|
||||
meta_window_update_sandboxed_app_id (window);
|
||||
meta_window_update_desc (window);
|
||||
|
||||
@@ -1314,7 +1308,7 @@ _meta_window_shared_new (MetaDisplay *display,
|
||||
set_net_wm_state (window);
|
||||
}
|
||||
|
||||
meta_compositor_add_window (screen->display->compositor, window);
|
||||
meta_compositor_add_window (window->display->compositor, window);
|
||||
window->known_to_compositor = TRUE;
|
||||
|
||||
/* Sync stack changes */
|
||||
@@ -1433,7 +1427,7 @@ meta_window_unmanage (MetaWindow *window,
|
||||
/* Make sure to only show window on all workspaces if requested, to
|
||||
* not confuse other window managers that may take over
|
||||
*/
|
||||
if (window->screen->closing && meta_prefs_get_workspaces_only_on_primary ())
|
||||
if (meta_prefs_get_workspaces_only_on_primary ())
|
||||
meta_window_on_all_workspaces_changed (window);
|
||||
|
||||
if (window->fullscreen)
|
||||
@@ -1740,11 +1734,8 @@ stackcmp (gconstpointer a, gconstpointer b)
|
||||
MetaWindow *aw = (gpointer) a;
|
||||
MetaWindow *bw = (gpointer) b;
|
||||
|
||||
if (aw->screen != bw->screen)
|
||||
return 0; /* don't care how they sort with respect to each other */
|
||||
else
|
||||
return meta_stack_windows_cmp (aw->display->stack,
|
||||
aw, bw);
|
||||
return meta_stack_windows_cmp (aw->display->stack,
|
||||
aw, bw);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@@ -3200,11 +3191,8 @@ unmaximize_window_before_freeing (MetaWindow *window)
|
||||
window->rect = window->saved_rect;
|
||||
set_net_wm_state (window);
|
||||
}
|
||||
else if (window->screen->closing /* See bug #358042 */
|
||||
#ifdef HAVE_WAYLAND
|
||||
&& !meta_is_wayland_compositor ()
|
||||
#endif
|
||||
)
|
||||
else if (!meta_is_wayland_compositor ())
|
||||
{
|
||||
/* Do NOT update net_wm_state: this screen is closing,
|
||||
* it likely will be managed by another window manager
|
||||
@@ -3219,6 +3207,7 @@ unmaximize_window_before_freeing (MetaWindow *window)
|
||||
window->saved_rect.width,
|
||||
window->saved_rect.height);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
@@ -6817,7 +6806,6 @@ meta_window_begin_grab_op (MetaWindow *window,
|
||||
op, &x, &y);
|
||||
|
||||
meta_display_begin_grab_op (window->display,
|
||||
window->screen,
|
||||
window,
|
||||
op,
|
||||
FALSE,
|
||||
@@ -7200,20 +7188,6 @@ meta_window_is_skip_taskbar (MetaWindow *window)
|
||||
return window->skip_taskbar;
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_window_get_screen:
|
||||
* @window: a #MetaWindow
|
||||
*
|
||||
* Gets the #MetaScreen that the window is on.
|
||||
*
|
||||
* Return value: (transfer none): the #MetaScreen for the window
|
||||
*/
|
||||
MetaScreen *
|
||||
meta_window_get_screen (MetaWindow *window)
|
||||
{
|
||||
return window->screen;
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_window_get_display:
|
||||
* @window: A #MetaWindow
|
||||
@@ -8303,7 +8277,6 @@ meta_window_handle_ungrabbed_event (MetaWindow *window,
|
||||
|
||||
if (op != META_GRAB_OP_WINDOW_BASE)
|
||||
meta_display_begin_grab_op (display,
|
||||
window->screen,
|
||||
window,
|
||||
op,
|
||||
TRUE,
|
||||
@@ -8327,7 +8300,6 @@ meta_window_handle_ungrabbed_event (MetaWindow *window,
|
||||
if (window->has_move_func)
|
||||
{
|
||||
meta_display_begin_grab_op (display,
|
||||
window->screen,
|
||||
window,
|
||||
META_GRAB_OP_MOVING,
|
||||
TRUE,
|
||||
|
Reference in New Issue
Block a user