Commit Graph

6656 Commits

Author SHA1 Message Date
Carlos Garnacho
f6b8fb5a6b gdk: Run DnD internal handlers before the main event handler
We'll be stealing those to GTK+, if the GdkDragContext manages
the DnD operation.
2016-01-19 14:17:35 +01:00
Carlos Garnacho
edc4374a63 gdk: Allow internal management of source-side DnD
We've traditionally left GTK+ to handle the input side of things,
letting GDK only manage the windowing-specific messaging. This
way of splitting responsibilities is not compatible however with
some backends, we must fold then input management at the DnD stage
into GDK (and backends) domain.

The gdk_drag_context_manage_dnd() call is meant to be the entry
point for this mode of operation, if the drag and drop operation
becomes managed, the caller (i.e. gtkdnd.c) doesn't need to perform
grabs, nor manage input events itself.

As a consequence of this, different aspects now belong to the
backend GdkDragContext implementation:
- Because the caller doesn't see keyboard events anymore,
  keyboard navigation must be managed in GDK, so is the decision
  of the current action based on modifiers/button pressed.
- Because the caller won't see input events in general, the lifetime
  of the drag and drop operation is now communicated through the
  ::drop-performed, ::dnd-finished and ::cancel events
- Because the caller doesn't participate anymore on the action
  being chosen, the pointer cursor must be set by the backend.
  The caller is rather notified of the final action through the
  ::action signal.

The caller is still responsible of dealing with the corresponding
GdkSelection, ensuring its ownership and communicating the supported
mimetypes.
2016-01-19 14:17:35 +01:00
Carlos Garnacho
f8b8e4eaf8 x11: Set event->scroll.is_stop
We still figure this out from 0/0 scroll events. This method is
not intended to last forever, but it's something we can cling to
so far.

https://bugzilla.gnome.org/show_bug.cgi?id=756729
2016-01-18 21:36:23 +01:00
Peter Hutterer
48aa1bb08f wayland: add gdk_event_is_scroll_stop_event()
And use it to handle kinetic scrolling in the GtkScrolledWindow.

However, dropping the delta check causes the X11-based kinetic
scroll to break since we don't have the stop event here. Correct handling of
xf86-input-libinput-based scroll events is still being discussed.

https://bugzilla.gnome.org/show_bug.cgi?id=756729
2016-01-18 21:36:23 +01:00
Peter Hutterer
3fca36169a wayland: add support for wl_pointer frame/axis_source/axis_discrete/axis_stop
This adds support for the new wl_pointer events available in v5.

The wl_pointer.axis_source events can be ignored for the purposes here, the
main reason they exist is so that the combination of axis_source=finger and
axis_stop triggers kinetic scrolling. We don't need to care about the source,
axis_stop is enough for us to tell us when we're scrolling.

The wl_pointer.frame events group events together and is intended as a
mechanism to coalesce events together. This for example allows us to now
send a single GTK scroll event for a diagonal scroll. Previously, the two
wl_pointer.axis events had to be handled separately.

The wl_pointer.axis_discrete event sends mouse wheel clicks where
appropriate, and is translated into up/down/left/right scroll events.

https://bugzilla.gnome.org/show_bug.cgi?id=756729
2016-01-18 21:36:23 +01:00
Timm Bäder
af958b86cb gdkdisplay-x11: Plug memory leak 2016-01-18 17:34:29 +01:00
Matthias Clasen
6f3cff16af gdk: Clarify docs about scale
Explicitly state where we return application pixels as opposed
to device pixels.
2016-01-18 08:54:35 -05:00
Matthias Clasen
bbc08d08a9 Trivial typo fix 2016-01-18 08:36:53 -05:00
Руслан Ижбулатов
f74f81f06b W32: Detect ticks wraparound
https://bugzilla.gnome.org/show_bug.cgi?id=748327
2016-01-18 09:23:44 +00:00
William Hua
2b95e4db55 mir: add default GdkSeat for the default GdkDisplay 2016-01-15 14:10:53 -05:00
Rui Matos
303556ac2a wayland: Fix an endless loop 2016-01-15 18:40:43 +01:00
Ignacio Casal Quinteiro
f6cc3be118 win32: get rid of _gdk_screen global variable
The screen is part of the display so it should be belong to it.
2016-01-15 12:35:31 +01:00
Ignacio Casal Quinteiro
ea7c509afd win32: fix warning 2016-01-15 11:56:01 +01:00
Tom Schoonjans
967ecc80d3 Windows library manager fix
The Makefile.am's had a dependency on incorrectly named libtool
archives for the generation of the .lib files.

https://bugzilla.gnome.org/show_bug.cgi?id=760388
2016-01-15 11:16:32 +01:00
Руслан Ижбулатов
37bd22c3d9 GDK W32: Don't use WM-drawn shadow for tooltips
This prevents WM from drawing shadows around tooltip windows,
which, in Adwaita, should have no shadow and are CSD-ish (which means
that tooltip window is larger than it looks, and WM draws the shadow
only on the outside, leaving a gap between the visible tooltip edge and
the shadow).

https://bugzilla.gnome.org/show_bug.cgi?id=759898
2016-01-14 14:53:15 +00:00
Paolo Borelli
3cd79c11fc win32: remove _gdk_root global variable 2016-01-14 14:30:37 +01:00
Dominique Leuenberger
d7e5fd2e2f QEMU USB Tablet is not really a tablet - it's a trick
Unfortunately, Qemu gives us this confusing device to work with,
and the best we can do is filter it out based on its name.

https://bugzilla.gnome.org/show_bug.cgi?id=760445
2016-01-12 23:03:14 -05:00
Ting-Wei Lan
f4d2d66b1e broadway: Call setlocale in main function of broadwayd
It is required to correctly show translated messages on some locales.

https://bugzilla.gnome.org/show_bug.cgi?id=760416
2016-01-12 23:00:03 -05:00
Alberts Muktupāvels
0ba5e38c91 gdkseat: remove return from gdk_seat_ungrab 2016-01-12 18:49:40 +02:00
Timm Bäder
8cb515e2f3 Remove stray semicolon
Gets rid of a mixed code/declaration warning.
2016-01-12 09:35:04 +01:00
Matthias Clasen
2c0b251dac Improve deprecation note for gdk_device_manager_get_client_pointer
List gdk_seat_get_pointer as replacement. Suggested in
https://bugzilla.gnome.org/show_bug.cgi?id=759785
2016-01-11 15:09:47 -05:00
Matthias Clasen
5c50250273 Fix the deprecation note for gdk_device_manager_list_devices
Pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=759785
2016-01-11 15:06:15 -05:00
Matthias Clasen
63365d5044 Fix the annotation for gdk_seat_get_slaves
Pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=759785
2016-01-11 15:05:21 -05:00
Rico Tzschichholz
2dc8d1f611 GdkSeat: Fix annotation of gdk_seat_grab() 2016-01-10 16:49:42 +01:00
Matthias Clasen
771149e19a wayland: Ensure we have a dnd-ask cursor
We use this for DND, so make sure that we fall back to some other
cursor if this one isn't present.
2016-01-08 18:11:07 -05:00
Matthias Clasen
04a9b5b5f8 x11: Ensure we have a dnd-ask cursor
We use this for DND, so make sure that we fall back to some other
cursor if this one isn't present.
2016-01-08 18:11:07 -05:00
Carlos Garnacho
ad0fc8ae7e wayland: Force the grab cursor while a grab is active
When a cursor is specified in gdk_seat_grab(), the cursor is reverted as
soon as the pointer enters or leaves another window.

To avoid this issue, store the grab cursor separately, so we force-apply
it in ::set_window_cursor(). Also, unset early the seat info from the
window on gdk_seat_ungrab(), so the next time switch_to_pointer_grab()
happens we end up picking the cursor set for the window underneath the
pointer window.

Based on a patch by Olivier Fourdan <ofourdan@redhat.com>.

https://bugzilla.gnome.org/show_bug.cgi?id=760213
2016-01-08 22:01:25 +01:00
Carlos Garnacho
23b629e27c x11: Initialize GdkWindowAttr struct memory
Valgrind complains about jumps based on uninitialized values
otherwise.
2016-01-08 21:58:33 +01:00
Matthias Clasen
b94f30bb64 Avoid an X error
We are getting the mime data destroy notify called when we
destroy the surface in finalize. Trying to set the XSync counters
at this time is a) pointless and b) yielding an X error because
the counters have already been destroyed.
To avoid this, unhook the damage tracking before destroying
the surface.

https://bugzilla.gnome.org/show_bug.cgi?id=760188
2016-01-08 13:50:46 -05:00
Matthias Clasen
4d60b5b10c x11: Fix damage tracking hack
We are setting mime data with a destroy notify on the cairo
surface to get notified when cairo registers damage for the
surface (in that case, it clears the mime data, calling the
destroy notify). Unfortunately, the destroy notify is also
called when we remove the mime data ourselves, which was
not intentional.

Use a flag in the window impl struct to ignore the callback
when we are clearing the hook.
2016-01-08 13:44:36 -05:00
Matthias Clasen
709cc08603 x11: Simplify drag cancel animation setup
Instead of creating an intermediate pixbuf, just render
the window surface onto the new surface. Doing things this
way lets us avoid the cairo_surface_mark_dirty() call in
gdk_pixbuf_get_from_window(), which is not generally safe
to call on 'random' surfaces - it asserts that the surface
has no mime data attached, and the X11 backend uses mime
data for damage tracking purposes...
2016-01-08 11:33:24 -05:00
Matthias Clasen
ea0084cd99 x11: Keep the drag window alive longer
We destroy the widget that is wrapped around the drag window
when the object data on the drag context gets cleared. Destroying
the window before that happens leads to unpleasantries. E.g. we may
try to access the frame clock, which doesn't exist anymore, and
things go downhill from there. So, keep the window alive for
a little longer.
2016-01-08 11:33:24 -05:00
Matthias Clasen
f9e504d70e wayland: Keep the drag window alive longer
We destroy the widget that is wrapped around the drag window
when the object data on the drag context gets cleared. Destroying
the window before that happens leads to unpleasantries. E.g. we may
try to access the frame clock, which doesn't exist anymore, and
things go downhill from there. So, keep the window alive for
a little longer.
2016-01-08 11:22:47 -05:00
Matthias Clasen
4eb333801b Revert "Translate GDK_KEY_KP_Decimal according to locale"
This reverts commit 7c7fde136e.

Too much controversy for this minor improvement.
See https://bugzilla.gnome.org/show_bug.cgi?id=756751
2016-01-08 08:59:02 -05:00
Olivier Fourdan
120088b15f wayland: Update parent of dialogs without transient
X11 has the notions of "transient for group", and while it's an ICCCM
violation, it's commonly used and documented that a window manager
would treat a window with transient_for set to None to transient for all
windows of its group.

gtk uses this when an application sets a dialog type window but does not
specify an explicit transient.

While this works on X11, there is no such thing as groups in Wayland and
the closest equivalent which is set_parent() in xdg-shell takes only one
parent. This is what is used for modal dialogs.

To get something similar in behavior to what is available on X11, a
solution is to update the parent() of the dialogs without transient when
the active surface changes.

Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=759161
2016-01-08 11:55:41 +01:00
Olivier Fourdan
28f011eb05 wayland: prefer subsurface when possible
Quite a few applications use GTK_WINDOW_POPUP to create various
temporary windows and place then on screen. That works fine on X11 but
on Wayland there is no global coordinate system for regular surfaces.

If the application is using a gdk temp window and set a parent with
gtk_window_transient_for(), the gdk wayland backend has all it needs to
create a subsurface that can be placed at will by the application.

Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=759738
2016-01-08 10:33:26 +01:00
Ben Gamari
fa66b271f8 gdkwindow-x11: Ensure that extended update counter is freed
I believe this lead to rampant leakage of SyncCounters by
gnome-terminal.

https://bugzilla.gnome.org/show_bug.cgi?id=760188
2016-01-07 21:13:42 -05:00
Matthias Clasen
10cc35405e wayland: Only do cursor name fallback for standard names
Always returning a left_ptr if we can't find anything better
broke firefox application-specific fallback for missing cursors.
Keep that working by only doing the fallback for the CSS cursor
names, not for things like hashes.

https://bugzilla.gnome.org/show_bug.cgi?id=760141
2016-01-06 14:57:42 -05:00
Matthias Clasen
d9befb9086 x11: Only do cursor name fallback for standard names
Always returning a left_ptr if we can't find anything better
broke firefox application-specific fallback for missing cursors.
Keep that working by only doing the fallback for the CSS cursor
names, not for things like hashes.

https://bugzilla.gnome.org/show_bug.cgi?id=760141
2016-01-06 14:57:42 -05:00
Matthias Clasen
b6e11d087c Add context-menu to the list of standard cursor names
Adwaita doesn't have this one, but we are falling to the
default cursor anyway.
2016-01-06 14:57:42 -05:00
Carlos Garnacho
9290aa7c46 GdkSeat: Use g_intern_static_string() for signal names
https://bugzilla.gnome.org/show_bug.cgi?id=759857
2015-12-25 14:26:58 +01:00
Kjell Ahlstedt
939be8a24b GdkSeat: Add G_BEGIN_DECLS and G_END_DECLS
https://bugzilla.gnome.org/show_bug.cgi?id=759771
2015-12-22 10:33:41 +01:00
Paolo Borelli
7f17468afc W32: avoid code duplication in gdkdevice-win32|virtual
The same get_position function is cut and pasted in the two
classes.
2015-12-22 09:31:56 +01:00
Alberts Muktupāvels
54c32fae1e x11: create GdkSeat also in GdkX11DeviceManagerCore
There are at least few cases when GdkX11DeviceManagerXI2 will not
be used. Make sure that we have GdkSeat in such cases.

https://bugzilla.gnome.org/show_bug.cgi?id=759309
2015-12-21 20:58:28 +01:00
Carlos Garnacho
fc2879108d wayland: Don't trigger grab on missing capabilities
Those might not be currently there in the first place.
2015-12-21 19:14:21 +01:00
William Hua
54fa65f544 gdkborder: change types from gint16 to gint 2015-12-17 12:56:35 -05:00
Paolo Borelli
8c355d8fe6 Win32: call dnd exit when finalizing the display
Since we init dnd when opening the display, call the corresponding
exit function (which is unused at the moment) when finalizing the
display.
2015-12-17 17:18:02 +01:00
Paolo Borelli
2e5616b27e Win32: move CoInitialize to dnd init
Functions requiring CoInitialize are called just in two places:
 - the filechooser thread which calls its own CoInitializeEx
 - the dnd code

Moving CoInitialize in the dnd specific init is cleaner and
we can pair it with the corresponding CoUninitialize since
CoUninitialize should be called as many times as CoInitialize.
Note that it is ok to call this function multiple times, so it
will not break if another codepath will need it in the future.

The patch also replaces the deprecated CoInitialize with the
equivalent call to CoInitializeEx (already used in the filechooser).
2015-12-17 17:18:01 +01:00
Carlos Garnacho
24afce5650 x11: Make fallback window dragging use seat grabs
Also, gdk_seat_ungrab() will undo the implicit grab when EWMH dragging
is used.
2015-12-16 19:47:06 +01:00
Carlos Garnacho
7ead57be8c x11: Add some ignore deprecation statements
In those places we still need access to floating devices, or we need to
use the GdkDeviceManager as its GdkEventTranslator interface.
2015-12-16 19:47:06 +01:00
Carlos Garnacho
c3f1565c18 x11: Avoid gdk_device_manager_get_client_pointer()
We can use the pointer of the default seat instead.
2015-12-16 19:47:06 +01:00
Carlos Garnacho
1fbf2fe4d7 wayland: Avoid GdkDeviceManager APIs
In most places, we can do with the pointer/keyboard of the default seat
instead of the client pointer. We can also remove some code from
gdk_input_init() because we know for sure there's no floating devices to
care about here.
2015-12-16 19:47:06 +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
3e1e02c2bc GdkDisplay: 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
50859d9efe GdkWindow: 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
644fa138c3 GdkDisplay: Iterate through seats' pointers/keyboards in older grab functions
Instead of using the GdkDeviceManager.
2015-12-16 19:47:06 +01:00
Carlos Garnacho
ce7bb7c739 GdkWindow: Iterate through seats' pointers/keyboards in older grab functions
Instead of using the GdkDeviceManager.
2015-12-16 19:47:05 +01:00
Carlos Garnacho
7a926cc7e0 gdkevents: Fallback to the event device seat
There's places where we don't set a seat yet, plus the places
outside GTK+ where events are created, we should warn and fall
back to the master device seat with these.
2015-12-16 19:47:05 +01:00
Carlos Garnacho
b0d72a36d8 gdkevents: Ensure the seat data is copied in events 2015-12-16 19:47:05 +01:00
Carlos Garnacho
c70da9b7ae gdk: Set seat on events generated in common code 2015-12-16 19:47:05 +01:00
Cosimo Cecchi
990dc9961a gdkevents: fix a compiler warning 2015-12-16 10:35:46 -08:00
Olivier Fourdan
b456db8cf4 wayland: Check transient loop
Gdk Wayland backend walks up the transient windows tree, but does not
check for cycles when doing so.

As a result, if two or more windows are transient to each other, the
Wayland gdk backend will enter an infinite loop.

While this is clearly a bug in the application, gtk+/gdk should be more
robust and handle such errors more gracefully.

To avoid looping infinitely at various point in the code, check for a
possible loop when setting the transient relationship and deny the
request to set a window transient for another if that would create a
loop.

Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=759299
2015-12-16 14:11:11 +01:00
Emmanuele Bassi
0b19197493 Fix the fix to the last commit
I should not push while compilation is still going on
2015-12-16 12:42:27 +00:00
Emmanuele Bassi
00102e35ea Fix previous commit
The scale parameter was missing.
2015-12-16 12:41:16 +00:00
Lars Uebernickel
1f07625705 gdk_pixbuf_get_from_window: honor device scale
gdk_pixbuf_get_from_window() paints the given window onto a new cairo
surface. Create that new surface with the same device scale as the
window so that the result is not scaled down on hidpi screens.

This is similar to 657a43e (which was reverted), but doesn't modify the
behavior of gdk_pixbuf_get_from_surface().

https://bugzilla.gnome.org/show_bug.cgi?id=757147
2015-12-16 13:07:58 +01:00
Carlos Garnacho
47632df9a5 gdkevents: Avoid gdk_device_manager_get_client_pointer()
It's now deprecated.
2015-12-15 23:24:59 +01:00
Carlos Garnacho
ee549c9ded GdkWindow: Listen to ::seat-removed in order to remove pointer info
Our actions on ::device-removed only actually applied to master
pointers, so listening to GdkDisplay::seat-removed and operating
on the seat pointer is equivalent.
2015-12-15 23:22:00 +01:00
Carlos Garnacho
b4aa498fe7 GdkWindow: Iterate through seats in gdk_window_set_cursor()
And set the pointer on all seat pointers, equivalent to the master
pointer lookup we were performing with GdkDeviceManager
2015-12-15 23:20:40 +01:00
Carlos Garnacho
ff686344c9 GdkWindow: Avoid gdk_device_manager_get_client_pointer()
It's now deprecated
2015-12-15 23:19:49 +01:00
William Hua
a6e4de2884 gdkborder: add GdkBorder to gdktypes.h 2015-12-15 10:13:03 -05:00
William Hua
c6bd3ddb8a gdkwindow: move GdkWindowTypeHint to gdktypes.h 2015-12-15 10:13:03 -05:00
Carlos Garnacho
5d6a2ae54f win32: Use GdkSeatDefault to implement GdkSeat 2015-12-15 00:40:22 +01:00
Carlos Garnacho
af54b82c0a quartz: Use GdkSeatDefault to implement GdkSeat 2015-12-15 00:40:21 +01:00
Carlos Garnacho
321154eb4b broadway: Use GdkSeatDefault to Implement GdkSeat 2015-12-15 00:40:21 +01:00
Carlos Garnacho
a33aefc281 wayland: Improve creation of windowing surface roles
We no longer need a grabbed seat, instead we'll just use the default
seat if this happens, not without first warning and recommending
gdk_seat_grab() for the operation.

https://bugzilla.gnome.org/show_bug.cgi?id=759309
2015-12-15 00:40:21 +01:00
Carlos Garnacho
c7280e4a31 wayland: Replace deprecated functions
We can just gdk_seat_ungrab() here.

https://bugzilla.gnome.org/show_bug.cgi?id=759309
2015-12-15 00:40:21 +01:00
Carlos Garnacho
4065bd1e96 gdk: Deprecate GdkDeviceManager and gdk_device_grab/ungrab()
GdkSeat is now the preferred way to deal with input devices and grabs.

https://bugzilla.gnome.org/show_bug.cgi?id=759309
2015-12-15 00:40:21 +01:00
Carlos Garnacho
3009eac85e wayland: Emit cancelled on touchpoint used on window dragging/moving
This allows GDK to unset the grab itself. Also, make sure we unset
the "pointer emulating" touch on the device if this is the
pointer emulating sequence.

https://bugzilla.gnome.org/show_bug.cgi?id=759309
2015-12-15 00:40:21 +01:00
Carlos Garnacho
77cf80f3a9 wayland: Unset "pointer emulating" touch on wl_touch.cancel
And emit the corresnponding leave event on its master pointer.

https://bugzilla.gnome.org/show_bug.cgi?id=759309
2015-12-15 00:40:21 +01:00
Carlos Garnacho
fc19a999ec gdk: Manage GDK_TOUCH_CANCEL events on gdk_windowing_got_event()
These events must get active/implicit grabs undone, and can be done
on client-side code.

https://bugzilla.gnome.org/show_bug.cgi?id=759309
2015-12-15 00:40:21 +01:00
Carlos Garnacho
09947a63ed wayland: Make gdk_wayland_device_get_focus() work on touch
So we can figure out the focus for the master device.

https://bugzilla.gnome.org/show_bug.cgi?id=759309
2015-12-15 00:40:21 +01:00
Carlos Garnacho
8ec3fb39a2 GdkDisplay: Add ::seat-added/removed signals
These will be emitted as seats come and go.

https://bugzilla.gnome.org/show_bug.cgi?id=759309
2015-12-15 00:40:21 +01:00
Carlos Garnacho
17525ef7a6 wayland: Add GdkSeat implementation
GdkWaylandDeviceData conceptually gathers the data that belongs to
a seat, so it's been renamed (although the old typedef stays, plenty
of refactoring is due here...).

The methods in GdkSeatClass have also been implemented, the most
remarkable is ::grab, which ensures the grab is performed on all
the relevant "master" devices.

https://bugzilla.gnome.org/show_bug.cgi?id=759309
2015-12-15 00:40:21 +01:00
Carlos Garnacho
d236fd7aab x11: Use GdkSeatDefault to implement GdkSeat
https://bugzilla.gnome.org/show_bug.cgi?id=759309
2015-12-15 00:32:55 +01:00
Carlos Garnacho
6e8d5f70db x11: Use gdk_event_set_device() consistently
Move the variable definitions above the function, and use those
throughout all branches of the event handling switch.
2015-12-15 00:16:15 +01:00
Carlos Garnacho
da6d52711a GdkEvent: Add GdkSeat getter and internal setter
https://bugzilla.gnome.org/show_bug.cgi?id=759309
2015-12-15 00:16:15 +01:00
Carlos Garnacho
6f4edc091b GdkDisplay: Add GdkSeat getters
https://bugzilla.gnome.org/show_bug.cgi?id=759309
2015-12-15 00:16:15 +01:00
Carlos Garnacho
d24f63e9ce GdkDevice: Add GdkSeat property and getter
https://bugzilla.gnome.org/show_bug.cgi?id=759309
2015-12-15 00:16:15 +01:00
Carlos Garnacho
0472c088a1 gdk: Add GdkSeatDefault
https://bugzilla.gnome.org/show_bug.cgi?id=759309
2015-12-15 00:16:15 +01:00
Carlos Garnacho
8d68f59bef gdk: Add GdkSeat
https://bugzilla.gnome.org/show_bug.cgi?id=759309
2015-12-15 00:16:15 +01:00
Carlos Garnacho
3733e53c1a x11: Use client pointer as default core pointer for gtk+2 API
There is no need to fiddle with the master devices list.

https://bugzilla.gnome.org/show_bug.cgi?id=759323
2015-12-15 00:04:20 +01:00
Lucas Baudin
306ee6d9a5 wayland: recursively search for the settings schema.
On some systems, the gtk settings are not used properly for wayland.
Indeed, g_settings_schema_source_get_default is used, and as the docs says it,
"all lookups performed against the default source should probably be done
recursively.".

https://bugzilla.gnome.org/show_bug.cgi?id=759409
2015-12-14 08:20:04 -05:00
Matthias Clasen
23b2b49321 x11: Implement drag cancel animation
Showing the drag cancel animation can be done in the X11
drag context implementation now that we hold the drag
window there, and have the start coordinates.

Since we can't control if and when the application destroys
the drag widget, we take a snapshot of the window contents
and display that during the animation. This should be good
enough for all practical purposes.
2015-12-13 15:49:25 -05:00
Matthias Clasen
c590b83397 gdk: Add gdk_drag_drop_done
This will allow us to move the drag cancel animation to GDK.
For now, it does nothing.
2015-12-13 10:39:43 -05:00
Matthias Clasen
ed89e5f62a x11: Store drag start coordinates
These will be used in later commits.
2015-12-13 10:39:43 -05:00
Matthias Clasen
268c7a3e44 gdk: Allow passing the start coordinates in drag_begin
Add a variant of gdk_drag_begin that takes the start position
in addition to the device. All backend implementation have been
updated to accept (and ignore) the new arguments.

Subsequent commits will make use of the data in some backends.
2015-12-13 10:39:43 -05:00
Jonas Ådahl
561833334b wayland: Implement DND icon hotspot API
In Wayland, the hotspot of a DND icon is set using the buffer offset in
wl_buffer.attach. To implement this, add a private API to cause the
next wl_surface.attach to offset the new buffer with a given offset.
Setting a DND icon hotspot sets this offset while also queuing a redraw
of the window to trigger the wl_surface.attach.

https://bugzilla.gnome.org/show_bug.cgi?id=759168
2015-12-11 09:16:46 -05:00
Matthias Clasen
28ae8a3608 Revert "wayland: Implement DND icon hotspot API"
This reverts commit 3ab9d96623.

Pushed prematurely.
2015-12-08 13:04:17 -05:00
Jonas Ådahl
3ab9d96623 wayland: Implement DND icon hotspot API
In Wayland, the hotspot of a DND icon is set using the buffer offset in
wl_buffer.attach. To implement this, add a private API to cause the
next wl_surface.attach to offset the new buffer with a given offset.
Setting a DND icon hotspot sets this offset while also queuing a redraw
of the window to trigger the wl_surface.attach.

https://bugzilla.gnome.org/show_bug.cgi?id=759168
2015-12-08 11:47:07 -05:00
Matthias Clasen
7d1a0b075d Trivial code restructuring 2015-12-07 21:57:45 -05:00