mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 09:30:45 -05:00
Remove some server calls for core devices
These were missed in the first porting. https://bugzilla.gnome.org/show_bug.cgi?id=691363
This commit is contained in:
parent
f57d64337b
commit
3a3be74e37
@ -1648,9 +1648,11 @@ window_focus_on_pointer_rest_callback (gpointer data) {
|
|||||||
MetaScreen *screen;
|
MetaScreen *screen;
|
||||||
MetaWindow *window;
|
MetaWindow *window;
|
||||||
Window root, child;
|
Window root, child;
|
||||||
int root_x, root_y, x, y;
|
double root_x, root_y, x, y;
|
||||||
guint32 timestamp;
|
guint32 timestamp;
|
||||||
guint mask;
|
XIButtonState buttons;
|
||||||
|
XIModifierState mods;
|
||||||
|
XIGroupState group;
|
||||||
|
|
||||||
focus_data = data;
|
focus_data = data;
|
||||||
display = focus_data->display;
|
display = focus_data->display;
|
||||||
@ -1660,10 +1662,12 @@ window_focus_on_pointer_rest_callback (gpointer data) {
|
|||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
meta_error_trap_push (display);
|
meta_error_trap_push (display);
|
||||||
XQueryPointer (display->xdisplay,
|
XIQueryPointer (display->xdisplay,
|
||||||
screen->xroot,
|
META_VIRTUAL_CORE_POINTER_ID,
|
||||||
&root, &child,
|
screen->xroot,
|
||||||
&root_x, &root_y, &x, &y, &mask);
|
&root, &child,
|
||||||
|
&root_x, &root_y, &x, &y,
|
||||||
|
&buttons, &mods, &group);
|
||||||
meta_error_trap_pop (display);
|
meta_error_trap_pop (display);
|
||||||
|
|
||||||
if (root_x != focus_data->pointer_x ||
|
if (root_x != focus_data->pointer_x ||
|
||||||
|
@ -1350,9 +1350,11 @@ primary_modifier_still_pressed (MetaDisplay *display,
|
|||||||
unsigned int entire_binding_mask)
|
unsigned int entire_binding_mask)
|
||||||
{
|
{
|
||||||
unsigned int primary_modifier;
|
unsigned int primary_modifier;
|
||||||
int x, y, root_x, root_y;
|
double x, y, root_x, root_y;
|
||||||
Window root, child;
|
Window root, child;
|
||||||
guint mask;
|
XIButtonState buttons;
|
||||||
|
XIModifierState mods;
|
||||||
|
XIGroupState group;
|
||||||
MetaScreen *random_screen;
|
MetaScreen *random_screen;
|
||||||
Window random_xwindow;
|
Window random_xwindow;
|
||||||
|
|
||||||
@ -1360,18 +1362,19 @@ primary_modifier_still_pressed (MetaDisplay *display,
|
|||||||
|
|
||||||
random_screen = display->screens->data;
|
random_screen = display->screens->data;
|
||||||
random_xwindow = random_screen->no_focus_window;
|
random_xwindow = random_screen->no_focus_window;
|
||||||
XQueryPointer (display->xdisplay,
|
XIQueryPointer (display->xdisplay,
|
||||||
random_xwindow, /* some random window */
|
META_VIRTUAL_CORE_POINTER_ID,
|
||||||
&root, &child,
|
random_xwindow, /* some random window */
|
||||||
&root_x, &root_y,
|
&root, &child,
|
||||||
&x, &y,
|
&root_x, &root_y,
|
||||||
&mask);
|
&x, &y,
|
||||||
|
&buttons, &mods, &group);
|
||||||
|
|
||||||
meta_topic (META_DEBUG_KEYBINDINGS,
|
meta_topic (META_DEBUG_KEYBINDINGS,
|
||||||
"Primary modifier 0x%x full grab mask 0x%x current state 0x%x\n",
|
"Primary modifier 0x%x full grab mask 0x%x current state 0x%x\n",
|
||||||
primary_modifier, entire_binding_mask, mask);
|
primary_modifier, entire_binding_mask, mods.effective);
|
||||||
|
|
||||||
if ((mask & primary_modifier) == 0)
|
if ((mods.effective & primary_modifier) == 0)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
else
|
else
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -1963,24 +1963,29 @@ meta_screen_get_mouse_window (MetaScreen *screen,
|
|||||||
{
|
{
|
||||||
MetaWindow *window;
|
MetaWindow *window;
|
||||||
Window root_return, child_return;
|
Window root_return, child_return;
|
||||||
int root_x_return, root_y_return;
|
double root_x_return, root_y_return;
|
||||||
int win_x_return, win_y_return;
|
double win_x_return, win_y_return;
|
||||||
unsigned int mask_return;
|
XIButtonState buttons;
|
||||||
|
XIModifierState mods;
|
||||||
|
XIGroupState group;
|
||||||
|
|
||||||
if (not_this_one)
|
if (not_this_one)
|
||||||
meta_topic (META_DEBUG_FOCUS,
|
meta_topic (META_DEBUG_FOCUS,
|
||||||
"Focusing mouse window excluding %s\n", not_this_one->desc);
|
"Focusing mouse window excluding %s\n", not_this_one->desc);
|
||||||
|
|
||||||
meta_error_trap_push (screen->display);
|
meta_error_trap_push (screen->display);
|
||||||
XQueryPointer (screen->display->xdisplay,
|
XIQueryPointer (screen->display->xdisplay,
|
||||||
screen->xroot,
|
META_VIRTUAL_CORE_POINTER_ID,
|
||||||
&root_return,
|
screen->xroot,
|
||||||
&child_return,
|
&root_return,
|
||||||
&root_x_return,
|
&child_return,
|
||||||
&root_y_return,
|
&root_x_return,
|
||||||
&win_x_return,
|
&root_y_return,
|
||||||
&win_y_return,
|
&win_x_return,
|
||||||
&mask_return);
|
&win_y_return,
|
||||||
|
&buttons,
|
||||||
|
&mods,
|
||||||
|
&group);
|
||||||
meta_error_trap_pop (screen->display);
|
meta_error_trap_pop (screen->display);
|
||||||
|
|
||||||
window = meta_stack_get_default_focus_window_at_point (screen->stack,
|
window = meta_stack_get_default_focus_window_at_point (screen->stack,
|
||||||
@ -2191,23 +2196,32 @@ meta_screen_get_current_monitor (MetaScreen *screen)
|
|||||||
if (screen->display->monitor_cache_invalidated)
|
if (screen->display->monitor_cache_invalidated)
|
||||||
{
|
{
|
||||||
Window root_return, child_return;
|
Window root_return, child_return;
|
||||||
int win_x_return, win_y_return;
|
double win_x_return, win_y_return;
|
||||||
unsigned int mask_return;
|
double root_x_return, root_y_return;
|
||||||
|
XIButtonState buttons;
|
||||||
|
XIModifierState mods;
|
||||||
|
XIGroupState group;
|
||||||
int i;
|
int i;
|
||||||
MetaRectangle pointer_position;
|
MetaRectangle pointer_position;
|
||||||
|
|
||||||
screen->display->monitor_cache_invalidated = FALSE;
|
screen->display->monitor_cache_invalidated = FALSE;
|
||||||
|
|
||||||
|
XIQueryPointer (screen->display->xdisplay,
|
||||||
|
META_VIRTUAL_CORE_POINTER_ID,
|
||||||
|
screen->xroot,
|
||||||
|
&root_return,
|
||||||
|
&child_return,
|
||||||
|
&root_x_return,
|
||||||
|
&root_y_return,
|
||||||
|
&win_x_return,
|
||||||
|
&win_y_return,
|
||||||
|
&buttons,
|
||||||
|
&mods,
|
||||||
|
&group);
|
||||||
|
|
||||||
|
pointer_position.x = root_x_return;
|
||||||
|
pointer_position.y = root_y_return;
|
||||||
pointer_position.width = pointer_position.height = 1;
|
pointer_position.width = pointer_position.height = 1;
|
||||||
XQueryPointer (screen->display->xdisplay,
|
|
||||||
screen->xroot,
|
|
||||||
&root_return,
|
|
||||||
&child_return,
|
|
||||||
&pointer_position.x,
|
|
||||||
&pointer_position.y,
|
|
||||||
&win_x_return,
|
|
||||||
&win_y_return,
|
|
||||||
&mask_return);
|
|
||||||
|
|
||||||
screen->last_monitor_index = 0;
|
screen->last_monitor_index = 0;
|
||||||
for (i = 0; i < screen->n_monitor_infos; i++)
|
for (i = 0; i < screen->n_monitor_infos; i++)
|
||||||
|
@ -6670,28 +6670,30 @@ meta_window_client_message (MetaWindow *window,
|
|||||||
*/
|
*/
|
||||||
if (button == 0)
|
if (button == 0)
|
||||||
{
|
{
|
||||||
int x, y, query_root_x, query_root_y;
|
double x, y, query_root_x, query_root_y;
|
||||||
Window root, child;
|
Window root, child;
|
||||||
guint mask;
|
XIButtonState buttons;
|
||||||
|
XIModifierState mods;
|
||||||
|
XIGroupState group;
|
||||||
|
|
||||||
/* The race conditions in this _NET_WM_MOVERESIZE thing
|
/* The race conditions in this _NET_WM_MOVERESIZE thing
|
||||||
* are mind-boggling
|
* are mind-boggling
|
||||||
*/
|
*/
|
||||||
mask = 0;
|
|
||||||
meta_error_trap_push (window->display);
|
meta_error_trap_push (window->display);
|
||||||
XQueryPointer (window->display->xdisplay,
|
XIQueryPointer (window->display->xdisplay,
|
||||||
window->xwindow,
|
META_VIRTUAL_CORE_POINTER_ID,
|
||||||
&root, &child,
|
window->xwindow,
|
||||||
&query_root_x, &query_root_y,
|
&root, &child,
|
||||||
&x, &y,
|
&query_root_x, &query_root_y,
|
||||||
&mask);
|
&x, &y,
|
||||||
|
&buttons, &mods, &group);
|
||||||
meta_error_trap_pop (window->display);
|
meta_error_trap_pop (window->display);
|
||||||
|
|
||||||
if (mask & Button1Mask)
|
if (mods.effective & Button1Mask)
|
||||||
button = 1;
|
button = 1;
|
||||||
else if (mask & Button2Mask)
|
else if (mods.effective & Button2Mask)
|
||||||
button = 2;
|
button = 2;
|
||||||
else if (mask & Button3Mask)
|
else if (mods.effective & Button3Mask)
|
||||||
button = 3;
|
button = 3;
|
||||||
else
|
else
|
||||||
button = 0;
|
button = 0;
|
||||||
@ -9850,11 +9852,12 @@ warp_grab_pointer (MetaWindow *window,
|
|||||||
meta_window_get_client_root_coords (window,
|
meta_window_get_client_root_coords (window,
|
||||||
&display->grab_anchor_window_pos);
|
&display->grab_anchor_window_pos);
|
||||||
|
|
||||||
XWarpPointer (display->xdisplay,
|
XIWarpPointer (display->xdisplay,
|
||||||
None,
|
META_VIRTUAL_CORE_POINTER_ID,
|
||||||
window->screen->xroot,
|
None,
|
||||||
0, 0, 0, 0,
|
window->screen->xroot,
|
||||||
*x, *y);
|
0, 0, 0, 0,
|
||||||
|
*x, *y);
|
||||||
|
|
||||||
if (meta_error_trap_pop_with_return (display) != Success)
|
if (meta_error_trap_pop_with_return (display) != Success)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user