Commit Graph

48 Commits

Author SHA1 Message Date
Matthias Clasen
0f476590fb Make gdk_event_get_pointer_emulated public
There is not strong reason to keep the getter private.
At the same time, strip _-prefixes from a few other GdkEvent
APIs. Update all callers.
2016-05-10 15:16:45 -04:00
Frediano Ziglio
cf14fea5a8 Save scancode inside GdkEventPrivate
Windows save in hardware_keycode an information which is not so low
level and some application require the hardware scancode.
As Windows provides this information save it in GdkEventPrivate
and provide a function to get this information.
For no Windows system the function return the hardware_keycode instead.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>

https://bugzilla.gnome.org/show_bug.cgi?id=765259
2016-04-21 22:35:47 -04:00
Paolo Borelli
539b1083de broadway: get the core pointer from the device manager
https://bugzilla.gnome.org/show_bug.cgi?id=762820
2016-02-29 14:15:04 +01:00
Carlos Garnacho
598dedfe36 broadway: Add a few ignore deprecations statements around GdkDeviceManager
There's places where we still need to deal with floating devices, which are
unseen by seats. Ignore deprecations and keep using GdkDeviceManager until
we can forget about floating devices.
2015-12-16 19:47:06 +01:00
Carlos Garnacho
321154eb4b broadway: Use GdkSeatDefault to Implement GdkSeat 2015-12-15 00:40:21 +01:00
Matthias Clasen
f733fa88f5 Broadway: Remove display assumptions
In various places, the broadway backend was just using
the default display and assumed that it is the broadway
display. That may not be the case in a multi-backend world,
so instead iterate over all displays and use the first
broadway display - still not perfect, but enough to survive
for now.
2014-10-25 10:32:53 -04:00
Alexander Larsson
67bcc6f04f broadway: Improve touch events
We now respect core pointer grabs, and we do the pointer emulation
detection on the browser side.
2013-11-14 11:05:16 +01:00
Alexander Larsson
ca89f5ab93 broadway: Send focus out events 2013-11-13 12:23:06 +01:00
Alexander Larsson
6917746c8e broadway: Fix focus handling with touch events 2013-11-13 12:23:06 +01:00
Alexander Larsson
4e8fa55827 broadway: Support window resize/drag via touch 2013-11-12 16:45:14 +01:00
Alexander Larsson
82acc05cba broadway: Add initial touch event support
This seems to get something going on an ipad, but some events seem
to get swallowed. For instance, window dragging doesn't work.
2013-11-12 16:11:15 +01:00
Alexander Larsson
ddade66496 broadway: use 'click-to-focus' approach instead of 'focus-follows-mouse'
The broadway backend would move the focus from one window to another based on
where the mouse was (i.e. 'focus-follows-mouse' approach). Handling the focus
this wait didn't play well with widgets which rely on focus-in-event and
focus-out-event, like the GtkEntry when using a completion popup window, see
e.g:
  https://bugzilla.gnome.org/show_bug.cgi?id=708984

So instead, setup broadway to require a click in a window to move the focus
(i.e. 'click-to-focus' approach):

 * The implicit GDK_FOCUS_CHANGE events that were generated upon reception of
   BROADWAY_EVENT_ENTER or BROADWAY_EVENT_LEAVE are removed.

 * The broadway daemon will now keep track of which is the focused window

 * Whenever the daemon detects an incoming BROADWAY_EVENT_BUTTON_PRESS, it will
   trigger the focused window switch, which sends a new BROADWAY_EVENT_FOCUS to
   the client, specifying which windows holds the focus.

 * Upon reception of a BROADWAY_EVENT_FOCUS, the client will generate a new
   GDK_FOCUS_CHANGE.

 * gdk_broadway_window_focus() was also implemented, which now requests the
   focus to the broadway server using a new BROADWAY_REQUEST_FOCUS_WINDOW.

This is based on an initial patch from Aleksander Morgado <aleksander@lanedo.com>.
2013-11-12 12:03:50 +01:00
Owen W. Taylor
f50a3af1b7 Handle recursion from motion event handlers
If a motion event handler (or other handler running from the flush-events
phase of the frame clock) recursed the main loop then flushing wouldn't
complete until after the recursed main loop returned, and various aspects
of the state would get out of sync.

To fix this, change flushing of the event queue to simply mark events as
ready to flush, and let normal event delivery handle the rest.

https://bugzilla.gnome.org/show_bug.cgi?id=705176
2013-11-11 23:17:14 -05:00
Alexander Larsson
a6a768437d broadway: Fix warning
Don't pass NULL source_device in grab/ungrab events
2013-04-05 17:07:03 +02:00
Alexander Larsson
a20cb3dd25 broadway: Ensure window sizes are synched right
We don't want to update the window size on configure event, only
the position, as the size is client side controlled. We were
updating to an old size during resizes which causes us to send
surfaces of the wrong size to the daemon.
2013-03-29 14:09:46 +01:00
Owen W. Taylor
df3e19b449 Broadway/Quartz/Win32: make event source prepare()/check() note paused status
When events are paused, we should not return TRUE from prepare() or check().
GTK+ handles this for events that are already in the GTK+ queue, but
we also need suppress checks for events that are in the system queue - if we
return TRUE indicating that there are events in the system queue, then we'll
call dispatch(), and do nothing. The event source will spin, and will never
run the other phases of the paint clock.

(Broadway doesn't have a window system queue separate from the GDK event queue,
but we write the function the same way for consistency.)

https://bugzilla.gnome.org/show_bug.cgi?id=694274
2013-02-21 09:59:58 -05:00
Alexander Larsson
9aa36d8d0d broadway: Add enum for even types 2012-12-27 22:56:03 +01:00
Alexander Larsson
0a808bea54 broadway: Separate out the server parts
This (shouldn't) change any behaviour, but it moves the
webserver parts to a separate file, making the broadway display file
smaller and preparing for later separating out the server to its own
process.
2012-12-20 00:00:16 +01:00
Matthias Clasen
144a5687c9 gdk: Don't use GDK_THREADS_ENTER/LEAVE macros internally
These are just wrappers for the functions, and we want to
deprecate them. Stopping to use them internally is a good
first step.
2012-07-30 18:01:47 +02:00
Javier Jardón
9d0febc9a6 Change FSF Address 2012-02-27 17:06:11 +00:00
Alexander Larsson
7f14b8bedf [broadway] Implement gdk_window_begin_resize_drag
This makes the resize grip work.
2011-04-15 20:34:32 +02:00
Alexander Larsson
887743728f [broadway] Handle keyboard modifiers in state 2011-04-14 21:36:42 +02:00
Alexander Larsson
01da867dac [broadway] Emulate hardware keycodes in keyboard events
We can't really know the client side keymaps, so we use the keysym
as the hardware keycode (essentially claiming to have a keyboard with
one key for all possible keysyms). This is not ideal, but its hard to
do better with no knowledge of the client side keyboard mappings.
(And html keyboard events suck badly...)
2011-04-14 21:36:42 +02:00
Alexander Larsson
095ccf9c11 [broadway] Serialize event times
Event times come from the browser and may change weirdly when we reconnect
with another browser, so we normalize these to be strictly increasing
and with a 5 second gap for each reconnect.
2011-04-07 19:12:51 +02:00
Alexander Larsson
dd07f534f4 [broadway] Handle screen size
Without this menu placement doesn't work right
2011-04-07 15:10:39 +02:00
Alexander Larsson
8c20b476df [broadway] Track and report last and future state
This fixes the drawing area demo in gtk-demo
2011-04-07 14:36:30 +02:00
Alexander Larsson
43aac66458 [broadway] Fix all unnecessary warnings 2011-04-07 10:03:17 +02:00
Alexander Larsson
3b1fe05e78 [broadway] Wire up the delete event 2011-04-07 10:03:17 +02:00
Alexander Larsson
adc05ae6b7 [broadway] Add configure event for browser-side geometry changes
Atm this only works for the useToplevelWindows case, but we can add
a browser wm to make use of it inside the browser too.
2011-04-07 10:03:17 +02:00
Alexander Larsson
e113cf26fb [broadway] Keep track of current real cursor window (sans grabs)
We need this to be able to do a non-roundtripping get-window.
2011-04-07 10:03:16 +02:00
Alexander Larsson
56d05e093d [broadway] Save last event time seen 2011-04-07 10:03:16 +02:00
Alexander Larsson
8aad17592e [broadway] Parse broadway input messages earlier
We now parse the broadway messages as soon as they are read from the wire.
This will let us sanely do lookahead in the message queue later.
2011-04-07 10:03:15 +02:00
Alexander Larsson
99d194b747 broadway: Fix various typos in mouse button event reporting 2011-03-14 15:24:25 +01:00
Alexander Larsson
ca203adc73 broadway: Fix up grab events, its "mode" not "detail" we send 2011-03-14 12:13:21 +01:00
Alexander Larsson
a1de735b87 broadway: Track button state 2011-03-14 12:09:19 +01:00
Alexander Larsson
95b19bca33 broadway: Implement pointer grabs 2011-03-14 11:52:46 +01:00
Alexander Larsson
cc808ae063 broadway: Move event coordinate calculation to browser side 2011-03-11 21:10:23 +01:00
Alexander Larsson
0cefd54122 broadway: Implement pointer query_status 2011-03-11 14:56:31 +01:00
Alexander Larsson
d4e2414d4a broadway: Add serial tracking and roundtripping 2011-03-10 14:58:47 +01:00
Alexander Larsson
07db0e38b0 [broadway] Make broadway build with new gdk-backend setup
Convert all global functions to vtable calls, etc.
2011-01-19 19:52:51 +01:00
Alexander Larsson
895922569e [broadway] Update to the new drawable-less APIs 2010-12-04 22:31:28 +01:00
Alexander Larsson
80f332308f [broadway] Add initial keyboard event support 2010-11-25 22:09:34 +01:00
Alexander Larsson
1ba38a48d7 [broadway] Remove old unused declarations 2010-11-25 22:09:33 +01:00
Alexander Larsson
ccab600fb4 Move event generation to gdkeventsource.c 2010-11-25 22:09:33 +01:00
Alexander Larsson
d707d057c2 [broadway] Rename X11 -> Broadway in all code
This just runs:
for i in *.[ch]; do
 sed -i s/DisplayX11/DisplayBroadway/g $i;
 sed -i s/PrivateX11/PrivateBroadway/g $i;
 sed -i s/ImplX11/ImplBroadway/g $i;
 sed -i s/KeymapX11/KeymapBroadway/g $i;
 sed -i s/ScreenX11/ScreenBroadway/g $i;
 sed -i s/GdkX11Monitor/GdkBroadwayMonitor/g $i;
 sed -i s/_X11/_BROADWAY/g $i;
 sed -i s/x11/broadway/g $i;
done
2010-11-25 22:09:29 +01:00
Alexander Larsson
c456e98880 Remove X use from broadway backend 2010-11-25 22:09:28 +01:00
Alexander Larsson
a54e556ad8 Remove event translators 2010-11-25 22:09:28 +01:00
Alexander Larsson
5b480e1b0d [broadway] Copy X backend to broadway 2010-11-25 22:09:19 +01:00