Commit Graph

4670 Commits

Author SHA1 Message Date
Carlos Garnacho
2c873990d1 core: enable XInput2 by default
This is nothing but the beginning, things work with a single
pointer/keyboard pair, but will be largely broken with multiple
devices interacting simultaneously, so we first need a policy
to establish a sensible behavior for extra pointer/keyboard
pairs.

the MUTTER_USE_CORE_DEVICES envvar has been added to force use
of Xlib core events for devices in order to check for regressions.
2011-07-15 18:03:47 +02:00
Carlos Garnacho
f15993f940 xi2: Workaround some bugs in XI2 passive grabs
XIAllMasterDevices doesn't quite work for key grabs, so only do
this at the moment for the Virtual Core Keyboard
2011-07-15 18:03:47 +02:00
Carlos Garnacho
d482dbcd16 display: Ignore events from slave devices
Mutter only handles master devices.
2011-07-15 18:03:47 +02:00
Carlos Garnacho
f5334dd6cf compositor: use meta_device_grab() for pointer/keyboard grabs
These happen invariably on the VCP/VCK pair.
2011-07-15 18:03:47 +02:00
Carlos Garnacho
972a9d231f screen: Use meta_device_pointer_set_window_cursor() for startup sequence.
At the moment feedback is only provided for the Virtual Core Pointer
2011-07-15 18:03:47 +02:00
Carlos Garnacho
1dd50cf006 device-map: Add meta_device_map_list_devices()
This function returns a list of the devices currently handled by
the device map.
2011-07-15 18:03:47 +02:00
Carlos Garnacho
855095ad1a core: Make frame handle per-pointer cursors. 2011-07-15 18:03:46 +02:00
Carlos Garnacho
95b2e6fafc workspace: use triggering device to focus the default window on workspace switch 2011-07-15 18:03:46 +02:00
Carlos Garnacho
dfcd079ec2 screen: make "monitor under pointer" logic work for several devices 2011-07-15 18:03:46 +02:00
Carlos Garnacho
e0966e7499 window: query the guessed pointer's modifiers on _NET_WM_MOVERESIZE 2011-07-15 18:03:46 +02:00
Carlos Garnacho
38df2715f2 display: Use the grab pointer for delayed window raising 2011-07-15 18:03:46 +02:00
Carlos Garnacho
5ecbb3ec3b keybindings: use the right device for querying the modifier mask. 2011-07-15 18:03:46 +02:00
Carlos Garnacho
656fa71649 devices: make meta_device_pointer_query_position() return a boolean
like in XQueryPointer/XIQueryPointer, the return value tells whether
the pointer device is on the same screen than the passed window.
2011-07-15 18:03:46 +02:00
Carlos Garnacho
bde0d28f1b core: Make keyboard focus handling happen per-keyboard
MetaFocusInfo is a struct holding all necessary info, code has
been updated to use the per-keyboard focus info instead of the
old fields.
2011-07-15 18:03:46 +02:00
Carlos Garnacho
4cb9a5e3bf core: Add meta_device_keyboard_[gs]et_focus_window()
These functions are meant to replace X[GS]etInputFocus() calls across
the core.
2011-07-15 18:03:45 +02:00
Carlos Garnacho
90c25f0cfe display: Use meta_device_grab() for pointer active grabs. 2011-07-15 18:03:45 +02:00
Carlos Garnacho
2484e8cd64 keybindings: Use meta_device_grab() for keyboard active grabs 2011-07-15 18:03:45 +02:00
Carlos Garnacho
61a7789c83 window: Use meta_device_pointer_warp() 2011-07-15 18:03:45 +02:00
Carlos Garnacho
c352e1078e core: Keep track of per pointer/keyboard grabs
There is now a MetaGrabInfo struct, holding all information about
an ongoing grab, there were unfortunately no means of making this
commit smaller, as things are too intertwined to separate it,

On places where it was most obvious, the correct device has been
used (in reaction to events, for example), in other parts, the
private API has been extended to include the MetaDevice (or device
ID for core.h functions), in other places, the virtual core
pointer/keyboard are used out of cluelessness.
2011-07-15 18:00:01 +02:00
Carlos Garnacho
d664579115 ui: Use input-events.h to translate XEvents to GdkEvents
This is the only use in the UI part of core functions not
exported via core.h, but this is sort of a hack within a hack,
and still better than doing the XInput2 vs core dance again.
2011-07-15 17:58:49 +02:00
Carlos Garnacho
49dfb40b82 devices: Make MetaDevice/MetaDeviceMap partly public
MetaDevice is quite limited outside of the core, mostly useful
to represent a device, and get the paired one.
2011-07-15 17:58:49 +02:00
Carlos Garnacho
e08c4756eb keybindings: Replace XGrabKey() with meta_device_map_grab_key() 2011-07-15 17:58:49 +02:00
Carlos Garnacho
6378527458 display: Replace XGrabButton with meta_device_map_grab_button() 2011-07-15 17:58:49 +02:00
Carlos Garnacho
f0705e142c core: Add XInput2 device map implementation 2011-07-15 17:58:49 +02:00
Carlos Garnacho
3f7193e558 Replace XAllowEvents with meta_device_allow_events() 2011-07-15 17:58:48 +02:00
Carlos Garnacho
3af9de08ab Use meta_core_select_events() for input events 2011-07-15 17:58:48 +02:00
Carlos Garnacho
111c23a6e0 core: Add method to select events on a window
This function handles XInput2 vs core in input events.
2011-07-15 17:58:48 +02:00
Carlos Garnacho
db6ddc4a7f devices-xi2: Export function to translate event mask 2011-07-15 17:58:48 +02:00
Carlos Garnacho
884e13474b Add XInput2 input devices implementation 2011-07-15 17:58:45 +02:00
Carlos Garnacho
722420df3a input-events: Add method to get the device for an event 2011-07-15 17:57:24 +02:00
Carlos Garnacho
50cee11c53 core: Add device map object
It will contain the input devices available
2011-07-15 17:57:24 +02:00
Carlos Garnacho
a727114ac2 core: Add core devices implementation 2011-07-15 17:57:24 +02:00
Carlos Garnacho
722d2d6472 device: Add methods to pair devices 2011-07-15 17:57:24 +02:00
Carlos Garnacho
7b9a26fbd8 Add pointer/keyboard abstract classes 2011-07-15 17:57:24 +02:00
Carlos Garnacho
5819e74c22 compositor: Use helper functions for input events 2011-07-15 17:57:24 +02:00
Carlos Garnacho
36e237cf1e keybindings: Use input event helper functions 2011-07-15 17:57:24 +02:00
Carlos Garnacho
3b0aa9f881 window: use input event helper functions on notify_focus() 2011-07-15 17:57:23 +02:00
Carlos Garnacho
e6d09c9d0b window: use input event helper functions in grab operations. 2011-07-15 17:57:23 +02:00
Carlos Garnacho
e26bf9dcef display: get crossing/focus events details via helper functions 2011-07-11 19:00:46 +02:00
Carlos Garnacho
748954a15e display: get button event coordinates with the helper functions 2011-07-11 19:00:46 +02:00
Carlos Garnacho
4c4f21c001 display: get button events state from helper functions 2011-07-11 19:00:46 +02:00
Carlos Garnacho
166559059a display: get button number from helper input event function 2011-07-11 19:00:46 +02:00
Carlos Garnacho
7566b4ea17 display: Use helper function to get input events' timestamp 2011-07-11 19:00:45 +02:00
Carlos Garnacho
1b7a6ce912 display: Use helper functions for getting window/root in input events 2011-07-11 19:00:45 +02:00
Carlos Garnacho
dc4ecdd0d2 display: Get the right window/time for input events 2011-07-11 19:00:45 +02:00
Carlos Garnacho
d381c0465b display: separate input/non-input events handling in the event callback
We now use meta_input_event_get_type() to discern input events from the
others. This commit has involved plenty of indenting changes, so it's
better seen with git diff -b.
2011-07-11 19:00:45 +02:00
Carlos Garnacho
38a0aecf61 core: Add helper code to handle input events
These will be used with every input event out there so they're
dealt with uniformly.
2011-07-11 19:00:45 +02:00
Carlos Garnacho
7573aae855 display: Add XInput2 variables in private struct 2011-07-11 19:00:45 +02:00
Carlos Garnacho
684d40d1a1 configure: Check for XInput2 2011-07-11 19:00:45 +02:00
Jakub Steiner
47b432bf89 Improve shadow defaults.
- menus have a very subtle shadow, define the outline better. Required for gtk theming.
- focused windows are better identified now as unfocused windows have a subtle shadow.

https://bugzilla.gnome.org/show_bug.cgi?id=649374
2011-07-11 16:00:03 +02:00