[gtk/wip/otte/dnd: 66/70] Merge remote-tracking branch 'origin/readonly-events-1' into wip/otte/dnd
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/otte/dnd: 66/70] Merge remote-tracking branch 'origin/readonly-events-1' into wip/otte/dnd
- Date: Wed, 19 Feb 2020 03:53:21 +0000 (UTC)
commit e03c519f1eec50a5e7befdbfe4dd89d9009bbe4c
Merge: d58a381c93 90a9aaf3a8
Author: Benjamin Otte <otte redhat com>
Date: Wed Feb 19 03:37:11 2020 +0100
Merge remote-tracking branch 'origin/readonly-events-1' into wip/otte/dnd
demos/gtk-demo/popover.c | 4 +-
demos/gtk-demo/themes.c | 4 +-
docs/reference/gdk/gdk4-sections.txt | 89 +-
gdk/broadway/gdkeventsource.c | 188 +--
gdk/gdkapplaunchcontext.c | 2 +-
gdk/gdkdisplay.c | 39 +-
gdk/gdkdisplay.h | 2 +-
gdk/gdkdisplayprivate.h | 6 +-
gdk/gdkdragprivate.h | 2 +-
gdk/gdkdrop.c | 68 +-
gdk/gdkdropprivate.h | 8 +-
gdk/gdkevents.c | 2890 +++++++++++++++-------------------
gdk/gdkevents.h | 250 ++-
gdk/gdkeventsprivate.h | 380 +++--
gdk/gdkinternals.h | 16 +-
gdk/gdkkeys.c | 11 +-
gdk/gdkseat.c | 2 +-
gdk/gdkseatdefault.c | 2 +-
gdk/gdkseatprivate.h | 2 +-
gdk/gdksurface.c | 106 +-
gdk/wayland/gdkdevice-wayland.c | 824 +++++-----
gdk/wayland/gdkeventsource.c | 2 +-
gdk/wayland/gdkprivate-wayland.h | 2 +-
gdk/wayland/gdksurface-wayland.c | 12 +-
gdk/win32/gdkdevicemanager-win32.c | 108 +-
gdk/win32/gdkdevicemanager-win32.h | 3 +-
gdk/win32/gdkdrag-win32.c | 85 +-
gdk/win32/gdkevents-win32.c | 469 +++---
gdk/win32/gdkprivate-win32.h | 2 +-
gdk/win32/gdksurface-win32.c | 2 +-
gdk/x11/gdkdevicemanager-xi2.c | 418 +++--
gdk/x11/gdkdisplay-x11.c | 131 +-
gdk/x11/gdkdisplay-x11.h | 3 +-
gdk/x11/gdkdrag-x11.c | 32 +-
gdk/x11/gdkdrop-x11.c | 10 +-
gdk/x11/gdkeventsource.c | 116 +-
gdk/x11/gdkeventtranslator.c | 10 +-
gdk/x11/gdkeventtranslator.h | 7 +-
gdk/x11/gdkprivate-x11.h | 2 -
gdk/x11/gdksurface-x11.c | 2 +-
gdk/x11/xsettings-client.c | 2 -
gdk/x11/xsettings-client.h | 2 -
gtk/a11y/gtkaccessibilityutil.c | 6 +-
gtk/gtkbindings.c | 13 +-
gtk/gtkbutton.c | 6 +-
gtk/gtkcalendar.c | 17 +-
gtk/gtkcellarea.c | 10 +-
gtk/gtkcombobox.c | 2 +-
gtk/gtkdragdest.c | 19 +-
gtk/gtkdragsource.c | 4 +-
gtk/gtkentrycompletion.c | 14 +-
gtk/gtkenums.h | 10 +
gtk/gtkeventcontroller.c | 202 ++-
gtk/gtkeventcontroller.h | 38 +-
gtk/gtkeventcontrollerkey.c | 253 ++-
gtk/gtkeventcontrollerlegacy.c | 4 +-
gtk/gtkeventcontrollermotion.c | 208 +--
gtk/gtkeventcontrollerprivate.h | 14 +-
gtk/gtkeventcontrollerscroll.c | 15 +-
gtk/gtkfilechooserentry.c | 12 +-
gtk/gtkflowbox.c | 2 +-
gtk/gtkgesture.c | 128 +-
gtk/gtkgesture.h | 6 +-
gtk/gtkgestureclick.c | 16 +-
gtk/gtkgesturedrag.c | 4 +-
gtk/gtkgesturelongpress.c | 2 +-
gtk/gtkgesturerotate.c | 19 +-
gtk/gtkgesturesingle.c | 18 +-
gtk/gtkgesturestylus.c | 21 +-
gtk/gtkgestureswipe.c | 4 +-
gtk/gtkgesturezoom.c | 10 +-
gtk/gtkiconview.c | 49 +-
gtk/gtkimcontextime.c | 4 +-
gtk/gtkimcontextsimple.c | 41 +-
gtk/gtkimmulticontext.c | 7 +-
gtk/gtklabel.c | 37 +-
gtk/gtklinkbutton.c | 2 +-
gtk/gtklistbox.c | 2 +-
gtk/gtkmain.c | 513 ++----
gtk/gtkmain.h | 10 +-
gtk/gtkmodelbutton.c | 66 +-
gtk/gtkmountoperation.c | 8 +-
gtk/gtknotebook.c | 4 +-
gtk/gtkpadcontroller.c | 12 +-
gtk/gtkpaned.c | 2 +-
gtk/gtkpopover.c | 13 -
gtk/gtkpopovermenu.c | 33 +-
gtk/gtkpopovermenubar.c | 40 +-
gtk/gtkrange.c | 4 +-
gtk/gtkscrolledwindow.c | 42 +-
gtk/gtkspinbutton.c | 14 +-
gtk/gtktext.c | 82 +-
gtk/gtktextview.c | 137 +-
gtk/gtktooltip.c | 9 +-
gtk/gtktooltipprivate.h | 3 +-
gtk/gtktreepopover.c | 28 +-
gtk/gtktreeview.c | 127 +-
gtk/gtktreeviewcolumn.c | 8 +-
gtk/gtkwidget.c | 380 +++--
gtk/gtkwidget.h | 4 -
gtk/gtkwidgetprivate.h | 18 +-
gtk/gtkwindow.c | 173 +-
gtk/gtkwindow.h | 4 +-
gtk/inspector/inspect-button.c | 2 +-
tests/testwindowdrag.c | 10 +-
testsuite/a11y/about.txt | 2 +-
testsuite/a11y/accessible-name.txt | 2 +-
testsuite/a11y/actionbar.txt | 2 +-
testsuite/a11y/assistant.txt | 4 +-
testsuite/a11y/buttons.txt | 2 +-
testsuite/a11y/calendar.txt | 2 +-
testsuite/a11y/colorchooser.txt | 52 +-
testsuite/a11y/combos.txt | 2 +-
testsuite/a11y/entries.txt | 2 +-
testsuite/a11y/expander.txt | 2 +-
testsuite/a11y/headerbar.txt | 2 +-
testsuite/a11y/hello-world.txt | 2 +-
testsuite/a11y/iconview.txt | 2 +-
testsuite/a11y/infobar.txt | 2 +-
testsuite/a11y/label-static.txt | 2 +-
testsuite/a11y/label.txt | 2 +-
testsuite/a11y/link.txt | 2 +-
testsuite/a11y/listbox.txt | 2 +-
testsuite/a11y/lockbutton.txt | 2 +-
testsuite/a11y/menubutton.txt | 2 +-
testsuite/a11y/menubutton2.txt | 2 +-
testsuite/a11y/messagedialog.txt | 2 +-
testsuite/a11y/mnemonic.txt | 2 +-
testsuite/a11y/notebook.txt | 2 +-
testsuite/a11y/paned.txt | 6 +-
testsuite/a11y/pickers.txt | 2 +-
testsuite/a11y/placeholder-text.txt | 2 +-
testsuite/a11y/progress.txt | 2 +-
testsuite/a11y/range.txt | 2 +-
testsuite/a11y/scale-drawvalue.txt | 2 +-
testsuite/a11y/spinner.txt | 4 +-
testsuite/a11y/stack.txt | 2 +-
testsuite/a11y/statusbar.txt | 2 +-
testsuite/a11y/text.txt | 2 +-
testsuite/a11y/tooltips.txt | 2 +-
testsuite/a11y/tree.txt | 2 +-
testsuite/gtk/focus.c | 81 +-
testsuite/gtk/gestures.c | 112 +-
testsuite/gtk/meson.build | 2 +-
144 files changed, 4457 insertions(+), 5148 deletions(-)
---
diff --cc gdk/gdkdrop.c
index d4605aa8da,0602d957bf..6d40b79d93
--- a/gdk/gdkdrop.c
+++ b/gdk/gdkdrop.c
@@@ -967,16 -941,13 +967,17 @@@ gdk_drop_emit_enter_event (GdkDrop *se
GdkDropPrivate *priv = gdk_drop_get_instance_private (self);
GdkEvent *event;
+ g_warn_if_fail (!priv->entered);
+
- event = gdk_event_new (GDK_DRAG_ENTER);
- event->any.surface = g_object_ref (priv->surface);
- event->dnd.drop = g_object_ref (self);
- event->dnd.time = time;
- gdk_event_set_device (event, priv->device);
+ event = gdk_event_drag_new (GDK_DRAG_ENTER,
+ priv->surface,
+ priv->device,
+ self,
+ time,
+ 0, 0);
+ priv->entered = TRUE;
+
gdk_drop_do_emit_event (event, dont_queue);
}
@@@ -989,21 -960,13 +990,15 @@@ gdk_drop_emit_motion_event (GdkDrop *s
{
GdkDropPrivate *priv = gdk_drop_get_instance_private (self);
GdkEvent *event;
- int x, y;
+ g_warn_if_fail (priv->entered);
+
- gdk_surface_get_origin (priv->surface, &x, &y);
-
- event = gdk_event_new (GDK_DRAG_MOTION);
- event->any.surface = g_object_ref (priv->surface);
- event->dnd.drop = g_object_ref (self);
- event->dnd.time = time;
- event->dnd.x_root = x_root;
- event->dnd.y_root = y_root;
- event->dnd.x = x_root - x;
- event->dnd.y = y_root - y;
- gdk_event_set_device (event, priv->device);
+ event = gdk_event_drag_new (GDK_DRAG_MOTION,
+ priv->surface,
+ priv->device,
+ self,
+ time,
+ x, y);
gdk_drop_do_emit_event (event, dont_queue);
}
@@@ -1016,16 -979,13 +1011,17 @@@ gdk_drop_emit_leave_event (GdkDrop *se
GdkDropPrivate *priv = gdk_drop_get_instance_private (self);
GdkEvent *event;
+ g_warn_if_fail (priv->entered);
+
- event = gdk_event_new (GDK_DRAG_LEAVE);
- event->any.surface = g_object_ref (priv->surface);
- event->dnd.drop = g_object_ref (self);
- event->dnd.time = time;
- gdk_event_set_device (event, priv->device);
+ event = gdk_event_drag_new (GDK_DRAG_LEAVE,
+ priv->surface,
+ priv->device,
+ self,
+ time,
+ 0, 0);
+ priv->entered = FALSE;
+
gdk_drop_do_emit_event (event, dont_queue);
}
@@@ -1038,25 -998,14 +1034,19 @@@ gdk_drop_emit_drop_event (GdkDrop *sel
{
GdkDropPrivate *priv = gdk_drop_get_instance_private (self);
GdkEvent *event;
- int x, y;
+ g_warn_if_fail (priv->entered);
+ g_warn_if_fail (priv->state == GDK_DROP_STATE_NONE);
+
- gdk_surface_get_origin (priv->surface, &x, &y);
-
- event = gdk_event_new (GDK_DROP_START);
- event->any.surface = g_object_ref (priv->surface);
- event->dnd.drop = g_object_ref (self);
- event->dnd.time = time;
- event->dnd.x_root = x_root;
- event->dnd.y_root = y_root;
- event->dnd.x = x_root - x;
- event->dnd.y = y_root - y;
- gdk_event_set_device (event, priv->device);
+ event = gdk_event_drag_new (GDK_DROP_START,
+ priv->surface,
+ priv->device,
+ self,
+ time,
+ x, y);
+ priv->state = GDK_DROP_STATE_DROPPING;
+
gdk_drop_do_emit_event (event, dont_queue);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]