mirror of
https://github.com/brl/mutter.git
synced 2025-02-17 05:44:08 +00:00
display: Update mouse mode focus code for XI2
This commit is contained in:
parent
5f6f67fb4e
commit
cc6dba2113
@ -49,6 +49,7 @@
|
|||||||
#include "xprops.h"
|
#include "xprops.h"
|
||||||
#include "workspace-private.h"
|
#include "workspace-private.h"
|
||||||
#include "bell.h"
|
#include "bell.h"
|
||||||
|
#include "device-pointer.h"
|
||||||
#include "device-keyboard.h"
|
#include "device-keyboard.h"
|
||||||
#include "device-private.h"
|
#include "device-private.h"
|
||||||
#include "input-events.h"
|
#include "input-events.h"
|
||||||
@ -1642,11 +1643,9 @@ window_focus_on_pointer_rest_callback (gpointer data)
|
|||||||
MetaDevice *device;
|
MetaDevice *device;
|
||||||
MetaScreen *screen;
|
MetaScreen *screen;
|
||||||
MetaWindow *window;
|
MetaWindow *window;
|
||||||
Window child, root;
|
Window child;
|
||||||
int root_x, root_y;
|
int root_x, root_y;
|
||||||
int x, y;
|
|
||||||
guint32 timestamp;
|
guint32 timestamp;
|
||||||
guint mask;
|
|
||||||
|
|
||||||
focus_data = data;
|
focus_data = data;
|
||||||
display = focus_data->display;
|
display = focus_data->display;
|
||||||
@ -1656,12 +1655,12 @@ window_focus_on_pointer_rest_callback (gpointer data)
|
|||||||
if (meta_prefs_get_focus_mode () == G_DESKTOP_FOCUS_MODE_CLICK)
|
if (meta_prefs_get_focus_mode () == G_DESKTOP_FOCUS_MODE_CLICK)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
meta_error_trap_push (display);
|
meta_device_pointer_query_position (META_DEVICE_POINTER (device),
|
||||||
XQueryPointer (display->xdisplay,
|
screen->xroot,
|
||||||
screen->xroot,
|
NULL,
|
||||||
&root, &child,
|
&child,
|
||||||
&root_x, &root_y, &x, &y, &mask);
|
&root_x, &root_y,
|
||||||
meta_error_trap_pop (display);
|
NULL, NULL, NULL);
|
||||||
|
|
||||||
if (root_x != focus_data->pointer_x ||
|
if (root_x != focus_data->pointer_x ||
|
||||||
root_y != focus_data->pointer_y)
|
root_y != focus_data->pointer_y)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user