diff --git a/src/core/display-private.h b/src/core/display-private.h index cf1f138f0..58fc0a6f4 100644 --- a/src/core/display-private.h +++ b/src/core/display-private.h @@ -162,7 +162,6 @@ struct _MetaDisplay /* current window operation */ MetaGrabOp grab_op; MetaWindow *grab_window; - int grab_button; int grab_anchor_root_x; int grab_anchor_root_y; MetaRectangle grab_anchor_window_pos; @@ -427,10 +426,6 @@ void meta_display_flush_queued_window (MetaDisplay *display, gboolean meta_display_begin_grab_op (MetaDisplay *display, MetaWindow *window, MetaGrabOp op, - gboolean pointer_already_grabbed, - gboolean frame_action, - int button, - gulong modmask, uint32_t timestamp, int root_x, int root_y); diff --git a/src/core/display.c b/src/core/display.c index b0a2116cc..d354bf671 100644 --- a/src/core/display.c +++ b/src/core/display.c @@ -1855,10 +1855,6 @@ gboolean meta_display_begin_grab_op (MetaDisplay *display, MetaWindow *window, MetaGrabOp op, - gboolean pointer_already_grabbed, - gboolean frame_action, - int button, - gulong modmask, /* XXX - ignored */ guint32 timestamp, int root_x, int root_y) @@ -1870,8 +1866,8 @@ meta_display_begin_grab_op (MetaDisplay *display, g_assert (window != NULL); meta_topic (META_DEBUG_WINDOW_OPS, - "Doing grab op %u on window %s button %d pointer already grabbed: %d pointer pos %d,%d", - op, window->desc, button, pointer_already_grabbed, + "Doing grab op %u on window %s pointer pos %d,%d", + op, window->desc, root_x, root_y); if (display->grab_op != META_GRAB_OP_NONE) @@ -1882,9 +1878,6 @@ meta_display_begin_grab_op (MetaDisplay *display, return FALSE; } - if (!frame_action) - op |= META_GRAB_OP_WINDOW_FLAG_UNCONSTRAINED; - event_route = get_event_route_from_grab_op (op); if (event_route == META_EVENT_ROUTE_WINDOW_OP) @@ -1912,9 +1905,6 @@ meta_display_begin_grab_op (MetaDisplay *display, display->grab_have_pointer = FALSE; - if (pointer_already_grabbed) - display->grab_have_pointer = TRUE; - if (META_IS_BACKEND_X11 (backend_from_display (display)) && display->x11_display) { @@ -1954,7 +1944,6 @@ meta_display_begin_grab_op (MetaDisplay *display, display->event_route = event_route; display->grab_op = op; display->grab_window = grab_window; - display->grab_button = button; display->grab_tile_mode = grab_window->tile_mode; display->grab_tile_monitor_number = grab_window->tile_monitor_number; display->grab_anchor_root_x = root_x; @@ -2043,7 +2032,6 @@ meta_display_end_grab_op (MetaDisplay *display, display->event_route = META_EVENT_ROUTE_NORMAL; display->grab_window = NULL; - display->grab_button = 0; display->grab_tile_mode = META_TILE_NONE; display->grab_tile_monitor_number = -1; display->grab_anchor_root_x = 0; diff --git a/src/core/window.c b/src/core/window.c index 26ca8a73b..c288e528f 100644 --- a/src/core/window.c +++ b/src/core/window.c @@ -6756,13 +6756,12 @@ meta_window_begin_grab_op (MetaWindow *window, y = pos.y; } + if (!frame_action) + op |= META_GRAB_OP_WINDOW_FLAG_UNCONSTRAINED; + return meta_display_begin_grab_op (window->display, window, op, - FALSE, - frame_action, - 0 /* button */, - 0, timestamp, x, y); } diff --git a/src/x11/window-x11.c b/src/x11/window-x11.c index dc0c0cd32..9a04bd26b 100644 --- a/src/x11/window-x11.c +++ b/src/x11/window-x11.c @@ -3373,11 +3373,8 @@ meta_window_x11_client_message (MetaWindow *window, else if ((button_mask & (1 << 3)) != 0) button = 3; - if (button != 0) - window->display->grab_button = button; - else - meta_display_end_grab_op (window->display, - timestamp); + if (button == 0) + meta_display_end_grab_op (window->display, timestamp); } else {