Commit Graph

29699 Commits

Author SHA1 Message Date
Benjamin Otte
510581e0ef x11: Use gdk_drag_context_get_display() 2017-12-16 02:48:12 +01:00
Matthias Clasen
4573d2d19b listbox: Fix a crash during keynav
The code was asserting something that was not always holding
true. We can hit row == NULL here on page-up too. Handle that
case by moving to the first row.

https://bugzilla.gnome.org/show_bug.cgi?id=791549
2017-12-15 18:48:50 -05:00
Benjamin Otte
cb9867cb48 dnd: Remove handler for nonexisting signal
The signal has been gone since e3e9bf4bea
2017-12-15 23:57:33 +01:00
Benjamin Otte
31119c89df gtk: Remove unused include 2017-12-15 23:53:18 +01:00
Benjamin Otte
a04afde35c gdk: Remove DRAG_STATUS and DROP_FINISHED events
Those are source-side events that are handled by signals of the
Dragontext these days.
2017-12-15 23:48:36 +01:00
Juan Pablo Ugarte
e0ce028c88 css: Fix segfault when GtkCssStyleChange is NULL on gtk_widget_real_style_updated()
https://bugzilla.gnome.org/show_bug.cgi?id=791281
2017-12-15 10:28:21 -03:00
Matthias Clasen
e92c0e85ec Replace gdk_keymap_get_for_display by gdk_display_get_keymap
Replace all uses of the old function by the new one.
No functional change.
2017-12-15 07:44:58 -05:00
Matthias Clasen
fd85ff0c7a Drop gdk_keymap_get_default()
It is better to use the explicit keymap getter - the
default display may not even use the current gdk backend.
2017-12-14 23:57:54 -05:00
Matthias Clasen
9194ee4973 gdk: Drop GDK_DAMAGE
We haven't been generating events of this type
since we dropped offscreen windows.
2017-12-14 23:35:08 -05:00
Matthias Clasen
65fc43a1f3 Drop GDK_CLIENT_EVENT
We never generate events of this type, so no need
to carry it around.
2017-12-14 22:55:03 -05:00
Matthias Clasen
a4a2ecb21a widget: Remove the ::window-state-event signal
We no longer use this signal, so remove it.
2017-12-14 22:24:06 -05:00
Matthias Clasen
0313b8f0bc gtk: Stop handling GdkEventWindowState
These events have been superseded by GdkWindow::state.
2017-12-14 22:24:06 -05:00
Matthias Clasen
8476fc3fb0 menu: Stop using GdkEventWindowState
These events are going away.
2017-12-14 22:24:06 -05:00
Matthias Clasen
c1f9d7cb16 a11y: Stop using GdkEventWindowState
These events are going way.
2017-12-14 22:24:06 -05:00
Matthias Clasen
40d57ff884 headerbar: Stop using GdkEventWindowState
Use GdkWindow::state instead - the event is going away.
2017-12-14 22:24:06 -05:00
Matthias Clasen
1e1904a9b8 gtk: Stop using GdkEventWindowState
We can instead use the new GdkWindow::state property
change notification. The event is going away.
2017-12-14 22:24:06 -05:00
Daniel Boles
fe20fc3128 FileChooser: Update set_local_only() doc’s default
The property now defaults to FALSE, but the setter doc didn’t reflect it

While here, add a missing apostrophe too.

https://bugzilla.gnome.org/show_bug.cgi?id=791176
2017-12-14 15:36:43 +00:00
Benjamin Otte
920259c250 x11: Get rid of default Atom converters
No, using the default Wayland display is not okay to query Atoms.
2017-12-14 13:35:32 +01:00
Matthias Clasen
54a6273191 Drop gdk_atom_intern
Atoms are just interned strings now, so we can just
use g_intern_string.
2017-12-13 23:39:03 -05:00
Matthias Clasen
4c083c1ed4 Drop gdk_atom_name
Since atoms are just interned strings now, we can just
cast them to const char * where needed.
2017-12-13 23:26:23 -05:00
Matthias Clasen
e3e9bf4bea Remove no-longer-used signals
GtkWidget::selection-get and ::selection-received are no
longer used, so get rid of them.
2017-12-13 22:53:50 -05:00
Benjamin Otte
b49a9b9933 dnd: Remove gdk_drag_get_selection()
Without selections, drags can't have them either.

Also included is removing the selection from GtkSelectionData.

Includes a bunch of crude cleanups to Wayland code that no longer has to
care about selection atoms.
2017-12-14 04:39:22 +01:00
Benjamin Otte
f2bb2024c8 gdk: Remove properties
They are not used anymore.

Gone with them are PropertyNotify events.
2017-12-14 03:05:34 +01:00
Benjamin Otte
38d8fa0b6a gesture: Fix gcc constness warning 2017-12-14 03:05:34 +01:00
Benjamin Otte
d7f34874ab x11: Make unsetting transient-for work
... and just unset it from GtkWindow instead of fiddling with
properties.
2017-12-14 03:05:34 +01:00
Benjamin Otte
a4b42f0b73 gdk: Remove selection defines
And with it, remove the selections section from the docs.

So selections are gone for good now.
2017-12-14 03:05:34 +01:00
Carlos Garnacho
332b640cd3 gtk: Make gtk_get_current_event() return a reference
All callers in gtk seem to be ok with it, and it makes sense if
we are dealing with events as "static after delivered".
2017-12-14 01:05:48 +01:00
Carlos Garnacho
ee178947d7 gtk: Avoid some event copies
Those places can do with an extra reference.
2017-12-14 01:05:48 +01:00
Carlos Garnacho
d491e49fd6 gtk: s/gdk_event_free/g_object_unref/ 2017-12-14 01:05:48 +01:00
Carlos Garnacho
47f04afa48 gtk: Remove CONSTRUCT_ONLY flag from GtkEventControllerScroll::flags
There is a gtk_event_controller_scroll_set_flags() call that's meant
to be called after construction (eg. due to scrolledwindow relayouts
hiding/showing scrollbars). The property shouldn't be construct-only
for consistence.
2017-12-14 01:05:48 +01:00
Carlos Garnacho
0c8c9f59fc gtk: Adapt marshallers to GdkEvent as GObject 2017-12-14 01:05:48 +01:00
Carlos Garnacho
33330ad001 gtk/a11y: Use allocated events
Using stack allocated GdkEvent will not be ok when they become
objects.
2017-12-14 00:58:32 +01:00
Carlos Garnacho
59cab36035 gdk: Fold GdkEventPrivate fields into event structs
Now all events structs are private, it doesn't make as much sense
having GdkEventPrivate wrapping allocating events. This is a first
step towards removing it.
2017-12-14 00:58:32 +01:00
Carlos Garnacho
64decbfd74 gdk: Remove GdkEventType argument from GdkEvent union
It won't stand true anymore that the GdkEventType argument is the
first field of the GdkEvent* structs. All callers have been updated
to use event->any.type instead.
2017-12-14 00:58:32 +01:00
Carlos Garnacho
b9db0b55cb gdk: Refurbish GdkEvent struct hierarchy
Make all specific event structs contain a GdkEventAny, so the base
struct can be extended without modifying structs all over the place.
2017-12-14 00:58:32 +01:00
Matthias Clasen
9aba77e31b Redo drag source event handling
Let the gesture itself handle the events.
2017-12-13 18:56:42 -05:00
Benjamin Otte
54f9aef0d4 gdk: Remove gdk_selection_convert()
It's not used anymore.
2017-12-14 00:44:26 +01:00
Benjamin Otte
ca5f859dc8 dnd: Only send DELETE request on X11
This is Xdnd-specific and doesn't need to happen elsewhere.
2017-12-13 23:52:55 +01:00
Benjamin Otte
4042d5f242 gdk: Remove ability to own a selection
With this, the GDK_EVENT_SELECTION_REQUEST and GDK_EVENT_SELECTION_CLEAR
and the associated GtkWidget signals are gone, too.
2017-12-13 23:39:02 +01:00
Benjamin Otte
cb3ef5b642 xxx: don't claim dnd selection 2017-12-13 19:37:11 +01:00
Benjamin Otte
b66052f3ce gdk: Remove gdk_selection_add_targets()
It's not needed anymore, now that we can look at the content provider's
formats.

Alose remove all the API in GTK that was used to set it.
2017-12-13 19:27:51 +01:00
Benjamin Otte
65eab87238 x11: Move selection handling to GDK
Instead of claiming the selection in GTK, claim it in the X11 dnd code.
Also handle SelectionRequest and SelectionClear X events there.
2017-12-13 18:31:06 +01:00
Benjamin Otte
8648d5409e dnd: Pass content to gdk_drag_begin()
Instead of just passing the GdkContentFormats, we are now passing the
GdkContentProvider to gdk_drag_begin().
This means that GDK itself can now query the data from the provider
directly instead of having to send selection events.

Use this to provide the private API gdk_drag_context_write() that allows
backends to pass an output stream that this data will be written to.
Implement this as the mechanism for providing drag data on Wayland.

And to make this all work, implement a content provider named
GtkDragContent that is implemented by reverting to the old DND
drag-data-get machinery inside GTK, so for widgets everything works just
like before.
2017-12-13 15:05:27 +01:00
Matthias Clasen
c30cd885dd A forgotten file
These changes belong to the scale button autoscrollling
commit.
2017-12-12 23:23:17 -05:00
Matthias Clasen
7e02ad648c toolbar: Stop using legacy event signals
We can reuse the button gesture here.
2017-12-12 22:55:48 -05:00
Matthias Clasen
fa7ef93bc5 scalebutton: Add autoscrolling
Use the smooth autoscrolling that the scale can do,
and at the same time stop using legacy event signals.
2017-12-12 22:21:43 -05:00
Matthias Clasen
05fbd32c4d button: Add private api to get at the gesture
Attaching another gesture from the outside does not
work currently, so let widgets share their button's
gesture for now.
2017-12-12 22:18:19 -05:00
Matthias Clasen
b891d205dd range: Add private api to autoscroll
This will be used to scroll the scale in scale buttons.
2017-12-12 22:17:49 -05:00
Matthias Clasen
2f6f8a7e6f path bar: Drop non-functional hold-to-scroll code
Scrolling a path bar is of marginal usefulness - you need to
find a really deep place in your filesystem hierarchy in order
to scroll one or two places at best. And the code we had for
this was not working. And it was using legacy event handlers.
Instead of fixing it, remove it.
2017-12-12 20:49:31 -05:00
Matthias Clasen
1b9aa1b708 a11y: drop the focus tracker
This code was doing horrible things, and the atk documentation
for the focus tracking feature says that this is deprecated and
not used anymore. So lets not do it.
2017-12-12 14:49:44 -05:00