mirror of
https://github.com/brl/mutter.git
synced 2024-11-29 03:20:46 -05:00
display: Kill off grab_screen
Just like active_screen, the screen can always be inferred from the MetaDisplay, so there's no point in keeping it around.
This commit is contained in:
parent
d7519f4ebc
commit
47aa583625
@ -431,7 +431,6 @@ meta_begin_modal_for_plugin (MetaScreen *screen,
|
|||||||
|
|
||||||
display->grab_op = META_GRAB_OP_COMPOSITOR;
|
display->grab_op = META_GRAB_OP_COMPOSITOR;
|
||||||
display->grab_window = NULL;
|
display->grab_window = NULL;
|
||||||
display->grab_screen = screen;
|
|
||||||
display->grab_have_pointer = TRUE;
|
display->grab_have_pointer = TRUE;
|
||||||
display->grab_have_keyboard = TRUE;
|
display->grab_have_keyboard = TRUE;
|
||||||
|
|
||||||
@ -453,7 +452,6 @@ meta_end_modal_for_plugin (MetaScreen *screen,
|
|||||||
|
|
||||||
display->grab_op = META_GRAB_OP_NONE;
|
display->grab_op = META_GRAB_OP_NONE;
|
||||||
display->grab_window = NULL;
|
display->grab_window = NULL;
|
||||||
display->grab_screen = NULL;
|
|
||||||
display->grab_have_pointer = FALSE;
|
display->grab_have_pointer = FALSE;
|
||||||
display->grab_have_keyboard = FALSE;
|
display->grab_have_keyboard = FALSE;
|
||||||
|
|
||||||
|
@ -667,10 +667,6 @@ meta_core_get_grab_frame (Display *xdisplay)
|
|||||||
display = meta_display_for_x_display (xdisplay);
|
display = meta_display_for_x_display (xdisplay);
|
||||||
|
|
||||||
g_assert (display != NULL);
|
g_assert (display != NULL);
|
||||||
g_assert (display->grab_op == META_GRAB_OP_NONE ||
|
|
||||||
display->grab_screen != NULL);
|
|
||||||
g_assert (display->grab_op == META_GRAB_OP_NONE ||
|
|
||||||
display->grab_screen->display->xdisplay == xdisplay);
|
|
||||||
|
|
||||||
if (display->grab_op != META_GRAB_OP_NONE &&
|
if (display->grab_op != META_GRAB_OP_NONE &&
|
||||||
display->grab_window &&
|
display->grab_window &&
|
||||||
|
@ -189,7 +189,6 @@ struct _MetaDisplay
|
|||||||
|
|
||||||
/* current window operation */
|
/* current window operation */
|
||||||
MetaGrabOp grab_op;
|
MetaGrabOp grab_op;
|
||||||
MetaScreen *grab_screen;
|
|
||||||
MetaWindow *grab_window;
|
MetaWindow *grab_window;
|
||||||
Window grab_xwindow;
|
Window grab_xwindow;
|
||||||
int grab_button;
|
int grab_button;
|
||||||
|
@ -562,7 +562,6 @@ meta_display_open (void)
|
|||||||
|
|
||||||
the_display->grab_op = META_GRAB_OP_NONE;
|
the_display->grab_op = META_GRAB_OP_NONE;
|
||||||
the_display->grab_window = NULL;
|
the_display->grab_window = NULL;
|
||||||
the_display->grab_screen = NULL;
|
|
||||||
the_display->grab_resize_popup = NULL;
|
the_display->grab_resize_popup = NULL;
|
||||||
the_display->grab_tile_mode = META_TILE_NONE;
|
the_display->grab_tile_mode = META_TILE_NONE;
|
||||||
the_display->grab_tile_monitor_number = -1;
|
the_display->grab_tile_monitor_number = -1;
|
||||||
@ -1977,7 +1976,6 @@ meta_display_begin_grab_op (MetaDisplay *display,
|
|||||||
|
|
||||||
display->grab_op = op;
|
display->grab_op = op;
|
||||||
display->grab_window = grab_window;
|
display->grab_window = grab_window;
|
||||||
display->grab_screen = screen;
|
|
||||||
display->grab_xwindow = grab_xwindow;
|
display->grab_xwindow = grab_xwindow;
|
||||||
display->grab_button = button;
|
display->grab_button = button;
|
||||||
display->grab_mask = modmask;
|
display->grab_mask = modmask;
|
||||||
@ -2030,7 +2028,7 @@ meta_display_begin_grab_op (MetaDisplay *display,
|
|||||||
"Grab op %u on window %s successful\n",
|
"Grab op %u on window %s successful\n",
|
||||||
display->grab_op, window ? window->desc : "(null)");
|
display->grab_op, window ? window->desc : "(null)");
|
||||||
|
|
||||||
g_assert (display->grab_window != NULL || display->grab_screen != NULL);
|
g_assert (display->grab_window != NULL);
|
||||||
g_assert (display->grab_op != META_GRAB_OP_NONE);
|
g_assert (display->grab_op != META_GRAB_OP_NONE);
|
||||||
|
|
||||||
if (display->grab_window)
|
if (display->grab_window)
|
||||||
@ -2058,7 +2056,7 @@ meta_display_end_grab_op (MetaDisplay *display,
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
g_signal_emit (display, display_signals[GRAB_OP_END], 0,
|
g_signal_emit (display, display_signals[GRAB_OP_END], 0,
|
||||||
display->grab_screen, display->grab_window, display->grab_op);
|
display->screen, display->grab_window, display->grab_op);
|
||||||
|
|
||||||
if (display->grab_window != NULL)
|
if (display->grab_window != NULL)
|
||||||
display->grab_window->shaken_loose = FALSE;
|
display->grab_window->shaken_loose = FALSE;
|
||||||
@ -2110,14 +2108,13 @@ meta_display_end_grab_op (MetaDisplay *display,
|
|||||||
if (display->grab_window)
|
if (display->grab_window)
|
||||||
meta_window_ungrab_all_keys (display->grab_window, timestamp);
|
meta_window_ungrab_all_keys (display->grab_window, timestamp);
|
||||||
else
|
else
|
||||||
meta_screen_ungrab_all_keys (display->grab_screen, timestamp);
|
meta_screen_ungrab_all_keys (display->screen, timestamp);
|
||||||
}
|
}
|
||||||
|
|
||||||
meta_cursor_tracker_set_grab_cursor (display->grab_screen->cursor_tracker, META_CURSOR_DEFAULT);
|
meta_cursor_tracker_set_grab_cursor (display->screen->cursor_tracker, META_CURSOR_DEFAULT);
|
||||||
|
|
||||||
display->grab_timestamp = 0;
|
display->grab_timestamp = 0;
|
||||||
display->grab_window = NULL;
|
display->grab_window = NULL;
|
||||||
display->grab_screen = NULL;
|
|
||||||
display->grab_xwindow = None;
|
display->grab_xwindow = None;
|
||||||
display->grab_tile_mode = META_TILE_NONE;
|
display->grab_tile_mode = META_TILE_NONE;
|
||||||
display->grab_tile_monitor_number = -1;
|
display->grab_tile_monitor_number = -1;
|
||||||
|
@ -30,7 +30,6 @@
|
|||||||
*/
|
*/
|
||||||
#define WINDOW_EDGES_RELEVANT(window, display) \
|
#define WINDOW_EDGES_RELEVANT(window, display) \
|
||||||
meta_window_should_be_showing (window) && \
|
meta_window_should_be_showing (window) && \
|
||||||
window->screen == display->grab_screen && \
|
|
||||||
window != display->grab_window && \
|
window != display->grab_window && \
|
||||||
window->type != META_WINDOW_DESKTOP && \
|
window->type != META_WINDOW_DESKTOP && \
|
||||||
window->type != META_WINDOW_MENU && \
|
window->type != META_WINDOW_MENU && \
|
||||||
@ -964,8 +963,8 @@ compute_resistance_and_snapping_edges (MetaDisplay *display)
|
|||||||
* 1st: Get the list of relevant windows, from bottom to top
|
* 1st: Get the list of relevant windows, from bottom to top
|
||||||
*/
|
*/
|
||||||
stacked_windows =
|
stacked_windows =
|
||||||
meta_stack_list_windows (display->grab_screen->stack,
|
meta_stack_list_windows (display->screen->stack,
|
||||||
display->grab_screen->active_workspace);
|
display->screen->active_workspace);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 2nd: we need to separate that stacked list into a list of windows that
|
* 2nd: we need to separate that stacked list into a list of windows that
|
||||||
@ -1026,7 +1025,7 @@ compute_resistance_and_snapping_edges (MetaDisplay *display)
|
|||||||
* by other windows or DOCKS, but that's handled below).
|
* by other windows or DOCKS, but that's handled below).
|
||||||
*/
|
*/
|
||||||
meta_rectangle_intersect (&cur_rect,
|
meta_rectangle_intersect (&cur_rect,
|
||||||
&display->grab_screen->rect,
|
&display->screen->rect,
|
||||||
&reduced);
|
&reduced);
|
||||||
|
|
||||||
new_edges = NULL;
|
new_edges = NULL;
|
||||||
@ -1123,8 +1122,8 @@ compute_resistance_and_snapping_edges (MetaDisplay *display)
|
|||||||
*/
|
*/
|
||||||
cache_edges (display,
|
cache_edges (display,
|
||||||
edges,
|
edges,
|
||||||
display->grab_screen->active_workspace->monitor_edges,
|
display->screen->active_workspace->monitor_edges,
|
||||||
display->grab_screen->active_workspace->screen_edges);
|
display->screen->active_workspace->screen_edges);
|
||||||
g_list_free (edges);
|
g_list_free (edges);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1872,8 +1872,7 @@ meta_display_process_key_event (MetaDisplay *display,
|
|||||||
* we're in some special keyboard mode such as window move
|
* we're in some special keyboard mode such as window move
|
||||||
* mode.
|
* mode.
|
||||||
*/
|
*/
|
||||||
if (window ? (window == display->grab_window) :
|
if ((window && window == display->grab_window) || !window)
|
||||||
(screen == display->grab_screen))
|
|
||||||
{
|
{
|
||||||
switch (display->grab_op)
|
switch (display->grab_op)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user