Matthias Clasen
26d3fc311b
wayland: Keep hotspot when changing cursors
...
We need to pass the delta between the old and new hotspot
when attaching the new cursor surface, to keep the hotspot
at the same position. We can't deal with this in the compositor,
since the set_cursor call already overwrites the old hotspot,
so the information is lost by the time the attach happens.
Unfortunately, we can't query the initial hotspot from
the compositor, so the first cursor change will make the
hotspot jump.
https://bugzilla.gnome.org/show_bug.cgi?id=695512
2013-03-20 22:21:15 -04:00
Rob Bradford
1b15b9e1bc
wayland: Preserve dimensions separately for fullscreen / maximised case
...
Use separate fields for saving the window dimensions prior to fullscreening
and maximisation. Then use those fields to restore the window dimensions from.
2013-03-19 19:52:49 +00:00
Scott Moreau
1be7f3dee9
wayland: Implement gdk_window_[un]maximize
...
This allows the buttons in the decorations to maximise the window.
Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=695945
Signed-off-by: Rob Bradford <rob@linux.intel.com>
2013-03-18 15:51:39 +00:00
Scott Moreau
0d2c461720
wayland: Always attach buffer before committing
...
With recent changes in attach semantics, we always need to attach before
committing. Without this changes to the window contents to not get reflected
in the content of the surface.
Signed-off-by: Rob Bradford <rob@linux.intel.com>
2013-03-18 12:01:55 +00:00
Scott Moreau
50cde3658a
wayland: Remove unneeded semicolons
...
Signed-off-by: Rob Bradford <rob@linux.intel.com>
2013-03-18 12:01:55 +00:00
Scott Moreau
d8507a3a83
wayland: Remove unused wayland-egl header
...
This was left over from the work done in commit: d4a9863
Signed-off-by: Rob Bradford <rob@linux.intel.com>
2013-03-18 12:01:55 +00:00
Scott Moreau
89b1947631
wayland: Set title on shell surfaces to window title
...
We currently use this information to display the title
string in the window list of the desktop shell.
Signed-off-by: Rob Bradford <rob@linux.intel.com>
2013-03-18 12:01:55 +00:00
Matthias Clasen
5da58aa71d
wayland: Rename GdkDeviceManagerCore to GdkWaylandDeviceManager
...
The 'core' naming is just an artifact of having several generations
of input extensions in X11, no need to propagate that into other
backends.
2013-03-15 09:19:35 -04:00
Thomas Wood
00a107cc4c
wayland: don't attempt to unqueue events when events are paused
...
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.
https://bugzilla.gnome.org/show_bug.cgi?id=694274
2013-02-21 09:59:58 -05:00
Rob Bradford
2145907cfe
wayland: Synthesize fullscreen window state change
2013-02-19 13:11:12 +00:00
Thomas Wood
fbc0572068
wayland: attempt to determine the possible parent surface for popups
...
Use the surface beneath the device that created the grab as the transient
parent for the popup surfaces.
https://bugzilla.gnome.org/show_bug.cgi?id=693913
2013-02-18 19:38:21 -05:00
Thomas Wood
ec43a1f72a
wayland: look further through the hierarchy for the surface with the grab
...
https://bugzilla.gnome.org/show_bug.cgi?id=693912
2013-02-18 19:38:21 -05:00
Owen W. Taylor
645b5f398d
Reimplement _NET_WM_SYNC_REQUEST inside X11 backend
...
Deprecate gdk_window_enable_synchronized_configure() and
gdk_window_configure_done() and make them no-ops. Implement the
handling of _NET_WM_SYNC_REQUEST in terms of the frame cycle -
we know that all processing will be finished in the next frame
cycle after the ConfigureNotify is received.
2013-02-14 17:19:51 -05:00
Rob Bradford
4e1d999940
wayland: Add support for output device removal
...
Since we only receive an object id for the removed object we must try and
remove that from the list of devices based on that id.
2013-02-14 13:28:07 +00:00
Rob Bradford
fab808f92c
wayland: Add basic multiple output support
...
Store the wl_output pointer within the the GdkWaylandMonitor structure.
2013-02-14 13:02:27 +00:00
Jan Arne Petersen
ff2a387154
wayland: Handle wl_output in GdkWaylandScreen
...
Expose information about outputs in GdkScreen (gdk_screen_get_n_monitors
and gdk_screen_get_monitor_*).
2013-02-13 15:52:05 +00:00
Thomas Wood
bfd7137ffb
wayland: skip pointer and keyboard events without a surface
...
Pointer and keyboard events can be received after the surface has been
destroyed, in which case the surface will be NULL.
https://bugzilla.gnome.org/show_bug.cgi?id=693338
2013-02-12 15:30:56 +00:00
Thomas Wood
a8862727c9
wayland: set the "transient inactive" flag on tooltip surfaces
...
This prevents the tooltip surfaces from taking the focus away from the
parent surface.
https://bugzilla.gnome.org/show_bug.cgi?id=693313
2013-02-12 15:30:56 +00:00
Rob Bradford
f6383ebf9e
wayland: React to G_IO_ERR and G_IO_HUP on the wayland socket
...
Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=692728
2013-02-06 18:08:58 +00:00
Thomas Wood
2935b97b31
wayland: remove debug message
...
https://bugzilla.gnome.org/show_bug.cgi?id=693253
2013-02-06 16:56:44 +00:00
Thomas Wood
6657479c72
wayland: avoid returning NULL when getting a cursor
...
https://bugzilla.gnome.org/show_bug.cgi?id=693257
2013-02-06 16:56:44 +00:00
Thomas Wood
4f6d535626
wayland: use the GdkCursorType enum information to lookup the cursor name
...
Use the enum information to generate the cursor name rather than using a
lookup table.
https://bugzilla.gnome.org/show_bug.cgi?id=693256
2013-02-06 16:56:44 +00:00
Thomas Wood
69ac91b4b3
wayland: fix the direction of scrolling
...
Fix the direction of scrolling and convert the delta values into the
expected range.
https://bugzilla.gnome.org/show_bug.cgi?id=693251
2013-02-06 16:56:43 +00:00
Rob Bradford
b43d36d43d
wayland: Use g_value_set_static to avoid string copies
2013-02-05 18:28:43 +00:00
Rob Bradford
93c3fec125
wayland: Pull the cursor theme name out from the setting for it
...
This avoids us using the default theme and allows us to use a wider range of
cursors.
2013-02-05 13:25:20 +00:00
Rob Bradford
69e9ecf90a
wayland: Advertise the cursor theme through GtkSettings as Adwaita
...
... as per the way we advertise a GTK theme to use.
2013-02-05 13:25:20 +00:00
Jan Arne Petersen
e335a3fd31
wayland: Add global_remove handler
...
Do not crash on wl_registry.global_remove events anymore.
https://bugzilla.gnome.org/show_bug.cgi?id=692899
2013-02-01 23:04:16 -05:00
Jan Arne Petersen
e437016a65
wayland: Make GdkWaylandDevice public
...
Rename GdkDeviceCore to GdkWaylandDevice and export it properly in a
header file. Add public accessors for wl_seat, wl_pointer and
wl_keyboard.
https://bugzilla.gnome.org/show_bug.cgi?id=692823
2013-02-01 23:03:17 -05:00
Jan Arne Petersen
363eea659c
wayland: Rename GdkWaylandDevice
...
Rename GdkWaylandDevice to GdkWaylandDeviceData so that GdkDeviceCore
can be renamed to GdkWaylandDevice.
https://bugzilla.gnome.org/show_bug.cgi?id=692823
2013-02-01 23:03:15 -05:00
Jan Arne Petersen
ac3a50bfe6
wayland: Remove unused, commented out code
...
https://bugzilla.gnome.org/show_bug.cgi?id=692823
2013-02-01 23:03:12 -05:00
Rob Bradford
a687cbaae8
wayland: Implement gdk_window_fullscreen & gdk_window_unfullscreen
2013-01-29 18:42:44 +00:00
Rico Tzschichholz
22bad6a240
wayland: Add missing reference to gdkwaylandwindow.h
...
Missing bit of 01c0dd9182
2013-01-27 16:32:44 +01:00
Jan Arne Petersen
01c0dd9182
wayland: Make GdkWaylandWindow public
...
Allows to access Wayland specific window information like wl_surface and
wl_shell_surface.
Add gdk_wayland_window_get_wl_surface for getting the Wayland wl_surface
and gdk_wayland_window_get_wl_shell_surface for getting the Wayland
wl_shell_surface.
2013-01-23 22:26:27 +01:00
Jan Arne Petersen
2b9f0b4817
wayland: Make GdkWaylandDisplay public
...
Allows to access Wayland specific display information like wl_display
etc.
Add gdk_wayland_display_get_wl_display for getting the Wayland
wl_display.
2013-01-23 22:26:27 +01:00
Rob Bradford
2d676f32b1
wayland: Handle the keymap being needed before we know about seats
...
In the Wayland backend implementation for gdk_display_get_keymap we enumerate
the known devices and look for an core keyboard device. These device objects
are created when we receive the capabilities for the seat. The seat
capabilities may be received after a request for the keymap so we handle this
by creating a temporary keymap which we then free later when we have the real
one.
2013-01-22 19:12:29 +00:00
Rob Bradford
d4a9863e19
wayland: Drop code to use cairo-gl for rendering
...
The APIs that this code relied upon were removed in Wayland 1.0 and as such
this code has been broken since then.
2013-01-18 08:56:47 +00:00
Ran Benita
21cf5a7e00
wayland: update to work with stable libxkbcommon
...
libxkbcommon has had some changes to its API. However, it now has a
stable release (0.2.0), so this makes the necessary changes, and
replaces all uses of the deprecated API.
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-10-29 15:45:31 +00:00
Scott Moreau
e5b88f1bdd
wayland: Update to reflect protocol changes
2012-10-19 12:21:35 +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
Rob Bradford
7c51d67e7c
wayland: Fallback to setting transient windows if no seat available
...
If we don't have a wl_seat - because a grab hasn't been initialised by GTK+
then fallback to making the shell surface transient to the parent rather than
a popup surface.
2012-07-18 16:16:56 +01:00
Rob Bradford
8a39d2269e
wayland: Don't compare against GdkWindowTypeHint as a bitmask
...
The hint was being compared as a bitmask which means types that were not in
the list were being erroneously matched
2012-07-18 16:08:36 +01:00
José Dapena Paz
c5ef4e660b
wayland: Add default settings implementation for Wayland backend.
...
Signed-off-by: Rob Bradford <rob@linux.intel.com>
2012-07-17 11:31:54 +01:00
José Dapena Paz
33e928e472
wayland: Initial version of keyboard key event handling
...
Review comment: I think the implementation of the vfuncs in gdkkeys-wayland.c
depend on that we're using the keysysm as the hardware keycode. I think that
needs to be evaluated for the future. But for now this patch gives reasonably
complete keyboard input.
Signed-off-by: Rob Bradford <rob@linux.intel.com>
2012-07-16 20:11:41 +01:00
José Dapena Paz
d2c66e5afd
wayland: Hook up _get_num_lock / _get_caps_lock to read from XKB state
...
Signed-off-by: Rob Bradford <rob@linux.intel.com>
2012-07-16 20:11:41 +01:00
Rob Bradford
bef037f5d2
wayland: Remove unused function declaration
2012-07-16 20:11:41 +01:00
Rob Bradford
b5773b89cf
wayland: Remove annoying whitespace
2012-07-16 20:11:41 +01:00
José Dapena Paz
a4c80bd9cb
wayland: Create and expose an xkb_state on the keymap object
...
This is then logically associated with the input device since each (keyboard)
input device has its own keymap.
Signed-off-by: Rob Bradford <rob@linux.intel.com>
2012-07-16 20:11:41 +01:00
José Dapena Paz
d2267824b3
wayland: Refactor the keymap handling so it is associated with device
...
Although GDK expects the keymap to be associated with the display under
Wayland this is really associated with the input device so expose this by
finding the first keyboard device.
Signed-off-by: Rob Bradford <rob@linux.intel.com>
2012-07-16 20:11:41 +01:00
Rob Bradford
21f4b1cb35
wayland: Use the correct union member for axis events
...
Otherwise we end up overriding other members of the struct (in this case the
device pointer) and generate an error.
2012-07-16 15:38:09 +01:00
José Dapena Paz
a93f246056
wayland: implementation of pointer_handle_axis.
...
We translate wayland pointer axis events to GDK smooth scroll events, to
implement pointer_handle_axis events.
https://bugzilla.gnome.org/show_bug.cgi?id=679986
Signed-off-by: Rob Bradford <rob@linux.intel.com>
2012-07-16 15:37:53 +01:00
Rob Bradford
d8d4eb3faa
wayland: Implement the keyboard_enter/keyboard_leave events
...
This code is derived from the old keyboard focus change event handling.
2012-07-16 13:44:29 +01:00
Rob Bradford
3f0f328fd1
wayland: data_device.data_offer now has a safe object wrapper
...
The prototype for the listener has changed to provide a typesafe object rather
than an id that you have to bind into an object yourself.
2012-07-16 13:44:29 +01:00
Rob Bradford
1d080a01c1
wayland: Process the keymap that is sent over from the compositor
...
Load the keymap from the file descriptor that the compositor has sent us and
then save that into our internal object for future use.
2012-07-16 13:44:29 +01:00
Rob Bradford
19d16f8b80
wayland: Expose _gdk_wayland_display_get_keymap internally
2012-07-16 13:44:29 +01:00
Rob Bradford
91a11ee277
wayland: Ensure we destroy the shell surface when destroying the surface
...
Otherwise we can try and use an invalid object that the compositor has already
deleted.
2012-07-12 15:58:38 +01:00
Rob Bradford
8bd1478596
wayland: wl_shell_surface_set_popup requires a valid seat and serial
...
If we don't have our own grab then get the grab from the parent.
2012-07-12 15:58:38 +01:00
Rob Bradford
5b81186be3
wayland: Protocol update: wl_pointer_set_cursor takes a serial
2012-07-12 15:58:38 +01:00
Rob Bradford
310fd40357
wayland: Protocol update: wl_shell_surface_resize and _move take serials
2012-07-12 15:58:38 +01:00
Rob Bradford
9f039e5b74
wayland: Save the serial number for the ping event
2012-07-12 15:58:38 +01:00
Rob Bradford
a4f032f1ea
wayland: Save the serial numbers for the pointer events
2012-07-12 15:58:38 +01:00
Rob Bradford
7fe87016f3
wayland: Add internal API for handling Wayland serial numbers
...
We need to keep track of the serial numbers for various API requests.
2012-07-12 15:58:38 +01:00
Rob Bradford
17d1c3c833
wayland: Ensure that _get_client_pointer returns a pointer
...
The previous implementation could return a device that is a keyboard.
2012-07-12 15:58:38 +01:00
Rob Bradford
77791f0708
wayland: Port to libxkbcommon API changes
...
xkb_string_to_keysym -> xkb_keysym_from_name
xkb_keysym_get_name -> xkb_keysym_get_name
2012-07-12 15:58:38 +01:00
Rob Bradford
93a338245a
wayland: Switch to new wayland cursors mechanism
2012-07-12 15:58:38 +01:00
Rob Bradford
33b9f8e1b8
wayland: Protocol change: wl_buffer_damage
...
wl_buffer_damage is no longer necessary - it is sufficient to damage the
surface that the buffer is attached to instead.
2012-07-12 15:58:38 +01:00
Rob Bradford
6cdb75256e
wayland: Protocol change: configure event
...
The 'time' value has been removed.
2012-07-12 15:58:38 +01:00
Rob Bradford
0d1ae2e0dd
wayland: Protocol change: wl_shell_surface_* take surfaces for parents
...
These functions used to take shell_surface objects and now take surface
objects the parents.
2012-07-12 15:58:38 +01:00
Rob Bradford
8d7869ecbb
wayland: Remove unused variable
2012-07-12 15:58:38 +01:00
Rob Bradford
598c1b27fe
wayland: Temporary disable/hackaround keyboard code
2012-07-12 15:58:38 +01:00
Rob Bradford
f20ac38315
wayland: Port to SHM pool allocation mechanism
2012-07-12 15:58:38 +01:00
Rob Bradford
3eb0b195ed
wayland: Port to new input protocol mechanism
...
This replaces the wl_input_device with wl_pointer, wl_keyboard, wl_touch all
tied together under a wl_seat.
This is quite a radical change in protocol and for now keyboard handling is
disabled.
2012-07-12 15:58:38 +01:00
Rob Bradford
b1a5b19b4a
wayland: Load cursor theme using new Wayland cursor library
...
This requires the SHM object be initialised - therefore this is the most
logical (if slightly ugly place.)
We also need to make sure that we do something clever to load the correct
cursor theme.
2012-07-12 15:58:38 +01:00
Rob Bradford
2928ffc7b1
wayland: Remove unhelpful debug message
2012-07-12 15:58:37 +01:00
Rob Bradford
936ceb84b5
wayland: Protocol change: ping event on shell_surface
2012-07-12 15:58:37 +01:00
Rob Bradford
a9dc48ce94
wayland: Update to new header path for xkbcommon
2012-07-12 15:58:37 +01:00
Rob Bradford
af8e4ee8e7
wayland: Calculate window position offset to give emulated root coordinates
...
This allows combo box popup windows to appear in the correct place. This is a
workaround emulating root coordinates by calculating the offset for a chain
of windows that that are relative to each other.
2012-04-25 14:36:08 +01:00
Rob Bradford
568b310eb3
wayland: Only update position if the with_move flag is set
...
This was causing the combobox popup to be moved to (0,0) when just the
size was asserted.
2012-04-25 12:00:40 +01:00
Rob Bradford
55261f4e3f
wayland: Improve error message handling in cursor buffer code
2012-04-25 12:00:40 +01:00
Rob Bradford
1aa2a7f821
wayland: Improve the error reporting in the Cairo GL surface code path
2012-04-19 17:59:09 +01:00
Rob Bradford
b5845514ec
wayland: Improve error messages during SHM buffer creation
...
Use g_critical rather than fprintf and and also grab the error messages from
errno and from Cairo
2012-04-19 17:58:59 +01:00
Rob Bradford
cd831b1390
wayland: Expose GdkWaylandDisplayManager as a public GType
...
This permits a runtime test of whether we are running on the Wayland platform
or not.
2012-04-17 18:40:41 +01:00
Rob Bradford
6f9ad538d9
wayland: Rename GdkScreenWayland to GdkWaylandScreen
...
This makes it consistent with the functions in the vtable and also consistent
with other backends.
2012-04-17 14:11:31 +01:00
Rob Bradford
fc58ff1e6a
wayland: Rename GdkDisplayWayland to GdkWaylandDisplay
...
This makes it consistent with the functions in the vtable and also consistent
with other backends.
2012-04-17 14:11:31 +01:00
Rob Bradford
71ca53993e
wayland: Use an ARGB buffer for the Cairo and SHM surface
2012-04-16 15:09:14 +01:00
Rob Bradford
cddfcf1418
wayland: Force an expose for the whole area when scrolling
2012-04-16 15:09:14 +01:00
Rob Bradford
cdf5c2af62
wayland: Add support for rendering into an SHM buffer with Cairo image backend
...
The first version of this change included a bug that meant that if you don't
compile for any other backend then it wouldn't search for cairo. Credit for
identifying the bug goes to darxus@chaosreigns.com .
Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=672361
2012-04-16 15:09:14 +01:00
Rob Bradford
6977ea0bd1
wayland: Move the buffer creation to the cairo surface creation
2012-04-16 14:12:51 +01:00
Rob Bradford
d9ca1a8636
wayland: Move the finalize function to allow a clear logical block of code
2012-04-16 14:12:51 +01:00
Rob Bradford
a8d03c9970
wayland: Remove unused member from struct
2012-04-16 14:12:51 +01:00
Mathias Hasselmann
ebc2bda82b
wayland: hide predefined_atoms
...
This is a private symbol and should not be public.
2012-03-16 22:45:51 +01:00
Benjamin Otte
114b45c7eb
gdk: Make query_state() vfunc a void vfunc
...
... and make sure the backends implement it that way.
query_state() return value was ignored in all of GDK and caused crashes
when it failed.
2012-03-09 13:23:05 +01:00
Rob Bradford
c6b0e91e87
wayland: Add some useful comments explaining the cairo surface behaviour
2012-03-06 21:24:41 +00:00
Rob Bradford
ff2acecac6
wayland: Add NULL warning check to _gdk_wayland_window_set_device_grabbed
2012-03-06 21:24:41 +00:00
Rob Bradford
99e0f4b62c
wayland: Don't try and reset the pointer window grab if there wasn't one
2012-03-06 21:24:41 +00:00
Rob Bradford
8db9ba9e43
wayland: Categorise menus, popups and combo boxes as Wayland popup windows
...
Once we've made them popup windows we must also implement the popup_done event
handler on the shell surface listener. The best we can currently do is to hide
the window. This will then signal up to GTK which could then deactivate the
appropriate menu (see https://bugzilla.gnome.org/show_bug.cgi?id=670881 )
2012-02-27 17:15:12 +00:00
Rob Bradford
bdca0520e6
wayland: Store the device that does a grab for a window on the window
...
This allows us to get the device if we need to make the window a popup. This
relies on the side effect that GTK calls into GDK to take a grab before the
popup window is shown.
2012-02-27 17:15:12 +00:00
Rob Bradford
161b9d2066
wayland: Call wl_shell_surface_set_{popup,transient,toplevel} before attach
...
The requests only have an effect if you call them before the buffer is
attached to the surface.
2012-02-27 17:15:12 +00:00
Javier Jardón
9d0febc9a6
Change FSF Address
2012-02-27 17:06:11 +00:00
Michael Natterer
8c1c4dfd7c
gdk: pull more precondition checks into the generic gdkscreen.c
2012-02-24 16:44:44 +01:00
Michael Natterer
427b88f541
GdkScreen: fix precondition checks in the public API
...
Move g_return_if_fail() stuff from the backends to the public
functions in gdkscreen.c itself, and some fixes for ugly formatting in
the various gdkscreen-backend.c files.
2012-02-21 17:19:35 +01:00
Kristian Høgsberg
12e661c801
wayland: Fix return type from gdk_wayland_window_configure()
...
Should be void. Copy and paste error.
2012-01-30 09:07:24 -05:00
Kristian Høgsberg
aae9a71986
wayland: Also synthesize a configure event from gdk_window_wayland_move_resize
2012-01-29 07:32:44 -05:00
Kristian Høgsberg
b9190c7fe9
wayland: Destroy shell surface as we destroy the surface
2012-01-19 09:57:43 -05:00
Kristian Høgsberg
4c79e25915
wayland: Report middle and right buttons correctly
...
The linux evdev button codes have right as 274 and left as 273.
2012-01-18 12:04:18 -05:00
Rob Bradford
29641ecd07
wayland: Update modifiers handling to match new semantics
...
Due to changes in the behaviour of the virtual modifiers around MOD1 the
implementation of the map_virtual_modifiers vfunc was mangling the modifiers
and making keybindings not work correctly.
This change updates the implementation to match the X11 implementation's
behaviour.
2012-01-18 16:32:44 +00:00
Kristian Høgsberg
b9509ec15d
wayland: Handle request for selection atoms when there's no selection
2012-01-17 11:10:59 -05:00
Rob Bradford
dba9c2e5a7
wayland: Adapt move_resize vfunc implementation to match semantics
...
Callers of this function were passing in -1, -1 for the width and height if
they just wanted the window moving - rather than the size changing. We need to
respect that behaviour and don't try and set the width/height to those
dimensions.
Now pop-up windows (ala combo-boxes) work!
2012-01-17 15:05:03 +00:00
Kristian Høgsberg
7328cc73aa
wayland: Set GdkWindow focused state based on keyboard focus
2012-01-16 15:36:28 -05:00
Kristian Høgsberg
5f07e937c8
wayland: Implement client side keyboard repeat
2012-01-16 15:36:27 -05:00
Rob Bradford
08f5483fb7
wayland: Free the internal selection data when the selection is cleared
2012-01-13 16:50:47 +00:00
Rob Bradford
1e0b22c176
wayland: Fix memory handling for the selection callbacks
2012-01-13 16:50:47 +00:00
Rob Bradford
368d6c50b7
wayland: Add basic API for setting and clearing the selection on the device
2012-01-13 16:50:47 +00:00
Rob Bradford
cd795de6bf
wayland: Expose basic mechanism for getting selection content by callback
...
This version has a couple of TODOs/FIXMEs:
* We should do something better than g_io_channel_read_to_end
* Need to check the mime type is valid
2012-01-13 16:50:47 +00:00
Rob Bradford
9d90a17a7c
wayland: Add call to get types available for the selection as atoms
2012-01-13 16:50:47 +00:00
Rob Bradford
fe3f275945
wayland: Remove unused variables to silence compiler warning
2012-01-13 16:50:47 +00:00
Kristian Høgsberg
0e10fae36c
wayland: Set surface type based on GdkWindow hint
2012-01-13 09:50:38 -05:00
Rob Bradford
9e29ef5f3b
wayland: Update to new SHM buffer format type
2012-01-13 11:36:36 +00:00
Rob Bradford
e7e86ba5f4
wayland: Remove unused variable from grab implementation
2012-01-12 13:48:57 +00:00
Rob Bradford
0aa210866c
wayland: Fix compilation warning for destroy function implementation
2012-01-12 13:48:57 +00:00
Rob Bradford
f791687d3b
wayland: Fix implementation of gdk_atom_name
2012-01-12 13:48:57 +00:00
Rob Bradford
7f404a1fee
wayland: Remove unused variable
2012-01-12 13:48:46 +00:00
Rob Bradford
1f023cd2b1
wayland: Constrain the window configure requests to the window's geometry
...
When we receive a configure event from Wayland telling us to resize our
surface we check against the geometry constraints for the window to ensure we
do not resize below the minimum and maximum limits.
2012-01-09 17:19:34 +00:00
Rob Bradford
4107ef0b93
wayland: Implement set_geometry_hints vfunc
...
Our trivial implementation simply saves the passed in parameters into the
Wayland private data structure.
2012-01-09 17:19:34 +00:00
Rob Bradford
eedd1ec92f
wayland: Make the resize and move functions use gdk_device_ungrab
...
Now that grab and ungrab vfuncs are implemented on GdkDevice then we can use
gdk_device_ungrab to break the implicit grab created by the button press that
triggered the resize and move.
2012-01-09 16:00:14 +00:00
Kristian Høgsberg
e5283122fd
wayland: Add implementations for the device_grab / device_ungrab vfuncs
...
This allows the correct implementation of breaking the grab in pointer driven
resize and move.
Signed-off-by: Rob Bradford <rob@linux.intel.com>
2012-01-09 15:59:02 +00:00
Rob Bradford
47146dacff
wayland: Break an implicit grab when asking to be resized
...
An implicit grab is created inside GTK+ when the button is pressed down on a
window. The semantics of wl_shell_surface_resize means that you don't get a
corresponding release event that would ordinarily break the implicit grab. So
we must do it as part of the resize request.
2012-01-06 16:58:06 +00:00
Rob Bradford
675b2fddcb
wayland: Make the event source use _gdk_display_get_next_serial
2012-01-06 16:58:05 +00:00
Rob Bradford
e13cca00cc
wayland: Implement the get_next_serial vfunc on GdkDisplay
2012-01-06 16:58:05 +00:00
Kristian Høgsberg
e2dd95aced
wayland: The shared cursors are now installed in the weston directory
...
Signed-off-by: Rob Bradford <rob@linux.intel.com>
2012-01-06 15:12:14 +00:00
Rob Bradford
ff016a7857
wayland: Set a default cursor when the window cursor is set to NULL
...
This change follows on from a change in semantics in Wayland where calling
wl_input_device_attach with nil would make the compositor set the pointer
sprite to it's default cursor sprite.
2012-01-05 17:39:14 +00:00
Javier Jardón
24360a8076
gdk/*: Use g_list_free_full convenience function
2012-01-05 04:22:42 +01:00
Matthias Clasen
c6df2828b7
Add gdk_screen_get_monitor_workarea
...
The function returns the part of a monitors area that should be
used for positioning popups, menus, etc. The only non-trivial
implementation atm is in the X backend, all the other backends
just return the full monitor area. The X implementation is
currently suboptimal, since it requires roundtrips to collect
the necessary information. It should be changed to monitor
the properties for changes, when XFixes allows to monitor
individual properties.
https://bugzilla.gnome.org/show_bug.cgi?id=641999
2011-12-18 14:29:16 -05:00
Rob Bradford
8c1f8c0668
wayland: Add dummy implementation of the wl_data_device functionality
...
Setup listener functions for the drag and drop events as well as the selection
events. Then create and save a data structure representing the data offer from
the other client.
2011-12-14 14:47:27 +00:00
Rob Bradford
55b2286c3e
wayland: Add an implementation for GdkAtom
...
This implementation is based on a hash table. The hard coded GtkSelection
atoms are preloaded into the hash table at the correct values. User generated
atoms start after the last preloaded atom.
2011-12-14 14:45:44 +00:00
Rob Bradford
b165c1bac8
wayland: Get the data device during input device setup
...
The data device is a associated with the input device - fetch the data device
from the data manager for the current input device.
2011-12-14 14:44:44 +00:00
Rob Bradford
aea95c8efc
wayland: Retrieve the data device manager object
...
The data device manager is a global object that provides the support
infrastructure around data devices. These data device objects are the basis
for handling drag and drop as well as selections in Wayland.
2011-12-14 14:43:35 +00:00
Rob Bradford
32c9251b1e
wayland: Don't use deprecated function: gdk_window_get_pointer
...
Replace it with gdk_window_get_device_position.
2011-12-14 14:43:29 +00:00
Rob Bradford
83054baa16
wayland: Load cursors from wayland directory under XDG_DATA_DIRS
...
This means we don't have to have hardcoded "/usr/share/wayland" to find the
cursors.
This change also fixes up the warning messages for when loading fails.
2011-12-09 18:22:01 +00:00
Rob Bradford
b917c2f027
wayland: Port from wl_shell to wl_surface_shell
...
Previously all the commands that acted on the shell took the surface that was
to be acted on as parameter. Now we retrieve an object from the shell that
represents its state for the surface. With that wl_shell_surface object we can
then call methods on that.
Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
2011-12-05 16:20:39 +00:00
Kristian Høgsberg
0dd1f7edbc
wayland: Update to recent API changes
2011-12-02 05:41:43 -05:00
Matthias Clasen
3b152df48a
Wayland: Adapt to GdkWindowImpl api change
2011-11-05 01:12:26 -04:00
Michael Natterer
616afadd78
gdk: s/gdk_cursor_unref/g_object_unref/
2011-10-15 14:35:28 +02:00
Michael Natterer
5b74ee38e8
gdk: fix gdk_keyval_to_lower/upper() for Quartz, Win32 and Broadway
...
In 2.x, the !HAVE_XCONVERTCASE fallback of keyval_convert_case() was
implicitly used as implementation for all !X11 backends.
In 3.x, when this function was virtualized in GdkDisplayManager,
this fallback was moved to the X11 backend and the other backends
"equipped" with /* FIXME implement */ implementations of
keyval_convert_case() which don't convert anything.
Move the fallback code back to gdk/ as default implementation
of GdkDisplayManager::keyval_convert_case() and remove its
implementations is all backends but X11. Also remove the
implementation in Wayland which was a plain copy of what
is now the default implementation.
(cherry picked from commit f46c1b76d8
)
2011-10-07 16:19:41 +02:00
Daniel Nicoara
99f489b5ef
wayland: Acquire cairo device during operations that need the GL context
2011-08-22 16:32:06 -04:00
Javier Jardón
32e00d1f43
Use AM_CPPFLAGS instead the obsolete INCLUDES
2011-07-06 15:58:32 +01:00
Scott Moreau
24f1132671
Track wayland protocol changes.
2011-06-23 07:06:35 -04:00
Javier Jardón
7c688cb8a6
gdk: Use const instead G_CONST_RETURN
2011-06-10 13:07:54 +01:00
Kristian Høgsberg
2ebdcf5f37
wayland: Track wayland API changes
2011-05-08 13:20:11 -04:00
Kristian Høgsberg
f75ea21dcd
wayland: Remove non-existing gdkscreen-wayland.h from SOURCES
2011-04-13 14:34:26 -04:00
Kristian Høgsberg
fcd58b0ffd
wayland: Add modifier masks for meta, hyper and super keys
...
Makes alt keybindings work in vte.
2011-03-01 11:33:07 -05:00
Kristian Høgsberg
0e1041a8af
wayland: Add another cursor (left-ptr)
2011-03-01 11:32:05 -05:00
Kristian Høgsberg
b5134619a0
wayland: Map transient surfaces as such
2011-02-11 17:20:14 -05:00
Kristian Høgsberg
1cd65aea53
wayland: Only set x, y, and modifiers if the pointers are non-NULL
2011-02-11 17:07:19 -05:00
Kristian Høgsberg
152dca40d3
wayland: Remove window cursor hash
2011-02-11 10:06:56 -05:00
Kristian Høgsberg
ffe3af7f1c
wayland: There's only one screen
2011-02-11 09:56:58 -05:00
Kristian Høgsberg
6eac07d4f6
wayland: Trim some unused struct fields
2011-02-11 09:50:10 -05:00
Kristian Høgsberg
f2ac8c7ce3
wayland: Drop empty gdkscreen-wayland.h
2011-02-10 23:00:12 -05:00
Kristian Høgsberg
4ca3e53a3e
wayland: Drop GdkToplevelWayland and gdkwindow-wayland.h
2011-02-10 22:51:23 -05:00
Kristian Høgsberg
cd91551075
wayland: Fix resizing from other corners than just botton-right
2011-02-10 22:37:51 -05:00
Kristian Høgsberg
cfb9c840e5
wayland: Remove some fprintf debug messages
2011-02-10 22:22:42 -05:00
Kristian Høgsberg
6d20bcb848
wayland: Fix hiding and withdrawing surfaces
2011-02-10 22:21:08 -05:00
Kristian Høgsberg
22b9132ae5
wayland: Keep a reference to the surface we last attached
2011-02-10 22:04:26 -05:00
Kristian Høgsberg
3b205de896
wayland: Port over missing xkb functionality from X11 backend
2011-02-10 20:34:14 -05:00
Kristian Høgsberg
0db8663e44
wayland: Copy gdk_wayland_keymap_translate_keyboard_state from X11 backend
2011-02-10 16:35:38 -05:00
Kristian Høgsberg
f0fe810999
wayland: Adjust the hw keycode in key events for min_key_code
2011-02-10 16:34:40 -05:00
Kristian Høgsberg
c3955ea0c2
wayland: Add a few more cursors
2011-02-10 14:08:53 -05:00
Kristian Høgsberg
df0815470c
wayland: Return surface coordinates and mask in window_at_position
2011-02-10 13:42:59 -05:00
Kristian Høgsberg
4621c6476c
wayland: Send visibility event after map
2011-02-10 11:02:15 -05:00
Kristian Høgsberg
9e1a0a1bec
wayland: Fix indentation
2011-02-10 11:02:15 -05:00
Kristian Høgsberg
df57389190
wayland: Unref the keyboard focus surface when losing keyboard focus
2011-02-10 11:02:15 -05:00
Kristian Høgsberg
f62e4a02b6
wayland: Use GDK_NOTE for logging event debug messages
2011-02-10 11:02:15 -05:00
Kristian Høgsberg
9f0ed18d5a
wayland: Set event screen
2011-02-10 10:57:33 -05:00
Kristian Høgsberg
1b918d1b93
wayland: Pretend selection works, print debug message
2011-02-10 10:54:10 -05:00
Kristian Høgsberg
3beb09adca
wayland: Copy translate_keyboard_string() form x11 backend
2011-02-10 10:53:31 -05:00
Kristian Høgsberg
0583603b09
wayland: Actually return device in _gdk_wayland_device_get_device()
2011-02-10 10:49:51 -05:00
Kristian Høgsberg
f7f1b59e05
wayland: Handle blank cursor
2011-02-10 10:49:09 -05:00
Kristian Høgsberg
de82b82dd8
wayland: Clear modifier mask before restoring from keyboard_focus value
2011-02-09 16:36:15 -05:00
Kristian Høgsberg
c36dfccc64
wayland: Consolidate device and devicemanager implementation
2011-02-09 15:27:08 -05:00
Kristian Høgsberg
3ef3433511
wayland: Support setting cursors
...
And a handful unrelated cleanups. Still doesn't really have an answer
for cursor themes.
2011-02-09 14:48:31 -05:00
Kristian Høgsberg
546069f434
wayland: Use wayland-egl
2011-02-08 16:02:22 -05:00
Kristian Høgsberg
541d5172dd
Track 2.99.3 API changes
2011-02-08 08:12:59 -05:00
Kristian Høgsberg
1149c342bf
Clean up buffer handling a bit
2011-02-05 16:11:55 -05:00
Kristian Høgsberg
846e2c0eee
Remove leftover _gdk_windowing_set_cairo_surface_size()
2011-02-05 16:11:55 -05:00
Kristian Høgsberg
a65fcd0859
Hook up xkb_keysym_to_string and xkb_string_to_keysym
2011-02-05 16:11:55 -05:00
Kristian Høgsberg
7d29070faf
Implement GdkKeymap using libxkbcommon
2011-02-05 16:11:55 -05:00
Kristian Høgsberg
799279daf0
Invalidate window on configure
...
This will trigger a repaint of the window, but it may be more efficient
to just copy back the old surface contents and let gtk+ just update the
changed parts.
2011-02-05 16:11:54 -05:00
Kristian Høgsberg
56de871bf3
Create and attach buffer at process_updates time
...
This way we don't try to show the buffer until we've handle the initial
expose.
2011-02-05 16:11:54 -05:00
Kristian Høgsberg
7bbc158217
Remove copy of grab enum that's now in wayland core
2011-02-05 16:11:54 -05:00
Kristian Høgsberg
e6c1f5d94d
Dont iterate the display if there's nothing to write
2011-02-05 16:11:54 -05:00
Kristian Høgsberg
590f3dfa1f
Add Wayland backend
2011-02-05 16:11:54 -05:00