Carlos Garnacho
704cae1de3
backend: Use the most recent event time on replayed touch events
...
When a touch sequence is passively grabbed and later rejected, events
will be replayed on the next client in propagation order, although those
events (either transformed to pointer events or not) will contain the
original timestamps, this will make grabs fail with InvalidTime if triggered
from the replayed ButtonPress/TouchBegin handler.
In order to work around this, store the most recent event time (presumably
gotten from the XI_TouchEnd caused by the passive grab being rejected), and
use that time on the events being replayed afterwards and grabs, so we don't
possibly fail with InvalidTime if those events result in a compositor grab.
2014-07-08 11:21:29 -04:00
Carlos Garnacho
faf55c4627
backend-x11: Ensure touch event coordinates are translated to the stage's
...
Now that those events are going to be received, coordinates translation
should also happen on those.
2014-07-07 19:17:03 -04:00
Carlos Garnacho
f351c5d304
backend-x11: Remove pointless goto
...
The function is not as complex as needing that, plus it always jumped
anytime bypass_clutter is TRUE, so make all conditional code depend on
that.
2014-07-07 19:15:48 -04:00
Jasper St. Pierre
63bca17ab6
backend-x11: Only spoof the event when we're passing it to Clutter
...
There's no need to do so otherwise.
2014-07-07 19:13:31 -04:00
Jasper St. Pierre
b704659899
backend: Add an XIWarpPointer wrapper
...
This makes Alt+F7 / Alt+F8 work respectively under X11 nested mode.
For the native backend implementation, we'll need a special Clutter
function, so don't implement that for now.
2014-05-27 14:28:35 -04:00
Jasper St. Pierre
480a853263
x11: Add simple cursor renderer
2014-05-17 13:27:16 -04:00
Jasper St. Pierre
c8f3820956
backend-x11: Always pass None for the cursor
...
This means we fall back to what's defined on the root window, which
will give us our properly set cursor.
2014-05-13 16:20:03 -04:00
Jasper St. Pierre
9607513e62
backend-x11: Fix cursor position under nested
2014-04-28 13:29:45 -04:00
Jasper St. Pierre
18730f2a5e
backend-x11: Take grabs on the stage window
...
This means that grabs will be reported with respect to the
stage window, and that our event coordinates will be more
correct under nested.
2014-04-28 13:29:31 -04:00
Jasper St. Pierre
c5d4f4a245
backend-x11: Split out event translation to another method
...
Keep the indentation from getting too hairy.
2014-04-24 12:12:54 -04:00
Jasper St. Pierre
a027937ccc
backend-x11: Set the proper coordinates on the spoofed device event
...
When we click on a window with a passive grab, then the event_x
and event_y will be relative to that window, instead of relative to
the stage, which means that picking will be wrong.
Forcibly using root_x / root_y breaks nested mode. Nested mode is
a testing mode that should be replaced by a DRI3-enabled Xephyr,
though. It's getting too hairy to support properly.
2014-04-24 12:12:54 -04:00
Jasper St. Pierre
01a773ed5a
backend-x11: Don't use clutter_stage_get_default
...
It turns out Clutter doesn't actually set the stage as the default
when creating a new one, so this creates a new stage that then dies.
2014-04-23 16:01:02 -04:00
Jasper St. Pierre
97074ccdad
backend-x11: Fix leak of the event data
2014-04-23 15:43:34 -04:00
Jasper St. Pierre
6111bb9dec
backend-x11: Adapt a consistent naming scheme for the event struct
2014-04-23 15:43:34 -04:00
Jasper St. Pierre
e9eb3c32a9
compositor: Move event spoofing code to MetaBackendX11
...
This is now where we handle device events.
2014-04-23 14:23:13 -04:00
Jasper St. Pierre
fdd43fc2d9
backend-x11: Add KeyPress / KeyRelease to mask
2014-04-23 14:23:12 -04:00
Jasper St. Pierre
1dc8a7eca3
monitor: Remove handle_xevent as a generic method
2014-04-23 12:15:12 -04:00
Jasper St. Pierre
861cfc23df
x11: Make sure to handle RANDR events from the right connection
2014-04-23 12:15:12 -04:00
Jasper St. Pierre
86368e7e07
backend: Add grab_device / ungrab_device
...
This makes sure that we take active grabs on the correct connection.
Passive grabs are still broken.
2014-04-23 12:15:12 -04:00
Jasper St. Pierre
6c743dad88
xrandr: Rewrite to be based on the X11 display connection
2014-04-23 10:24:26 -04:00
Jasper St. Pierre
28666da6a1
backend-x11: Simplify XSync initialization handling a bit
2014-04-22 14:17:08 -04:00
Jasper St. Pierre
3d091e514d
backend: Poll events from the host X11 server ourselves
...
I was accidentally pulling events from the Xwayland server under
nested for the idle monitor, which is wrong. Whoops.
2014-04-22 10:26:03 -04:00
Jasper St. Pierre
c44b1d730d
backends: Move MonitorManager creation to MetaBackend as well
2014-04-21 20:25:21 -04:00
Jasper St. Pierre
48dc544bef
backends: Move most of the code from meta_backend_init into the subclasses
2014-04-21 20:25:21 -04:00
Jasper St. Pierre
31d744195d
backends: Build MetaBackend subclasses for each backend
2014-04-21 20:25:21 -04:00