Commit Graph

296 Commits

Author SHA1 Message Date
Matthias Clasen
fcb69e110b Remove an unneeded include 2014-09-06 19:03:06 -04:00
Carlos Garnacho
6f538950d4 dnd: Make the drag gesture obey the button mask specified
This was forgotten when making DnD use a GtkGesture in the handlers
attached to the widget in gtk_drag_source_set(). The gesture must obey
the specified button mask, and switch to denied state if the pressed
button isn't part of the given mask.

https://bugzilla.gnome.org/show_bug.cgi?id=735965
2014-09-04 14:59:08 +02:00
Carlos Garnacho
14b4e4d35a gtkdnd: Hardcode the DnD window onto the drag widget window on Wayland
This makes the drag widget use the same window surface that was passed
when starting the drag operation.

https://bugzilla.gnome.org/show_bug.cgi?id=697855
2014-09-01 19:50:12 +02:00
Matthias Clasen
7bec0939a8 Clean up and unify docs and formatting 2014-08-16 21:40:39 -04:00
Carlos Garnacho
8ca205af5d dnd: Set explicitly GtkGestureSingle::button to 0 on the drag gesture
This gesture handles drags done with any button, so unset the current button=1
default.

https://bugzilla.gnome.org/show_bug.cgi?id=734285
2014-08-15 13:53:39 +02:00
Carlos Garnacho
dd9166c435 dnd: Set drag gesture propagation phase to GTK_PHASE_NONE explicitly
This used to rely on the default phase value.

https://bugzilla.gnome.org/show_bug.cgi?id=734285
2014-08-15 13:49:39 +02:00
Matthias Clasen
cfec3ba794 Document that the drag icon window will be modified
This is in response to the complaint in
https://bugzilla.gnome.org/show_bug.cgi?id=732991
2014-07-11 18:09:47 -04:00
Carlos Garnacho
d05a9f9a7b gesture: Replace gtk_gesture_attach/detach with event controller API
Event controllers now auto-attach, and the GtkCapturePhase only determines
when are events dispatched, but all controllers are managed by the widget wrt
grabs.

All callers have been updated.
2014-05-27 17:47:12 +02:00
Carlos Garnacho
994c94c25b dnd: Check on the right gesture sequence when starting the drag op 2014-05-23 19:54:29 +02:00
Carlos Garnacho
5369c77029 gesture: Simplify gesture/widget interaction public API
The propagation phase property/methods in GtkEventController are gone,
This is now set directly on the GtkWidget add/remove controller API,
which has been made private.

The only public bit now are the new functions gtk_gesture_attach() and
gtk_gesture_detach() that will use the private API underneath.

All callers have been updated.
2014-05-23 19:54:29 +02:00
Carlos Garnacho
040c82f0e8 dnd: Update to gesture widget-level API changes 2014-05-23 19:54:25 +02:00
Carlos Garnacho
b0eef458d1 dnd: Use GtkGestureDrag to initiate DnD
This gesture is used by gtk_drag_source_set() to determine
whether dragging moved past the threshold. The gesture events
are handled via the usual ::event callbacks, so we don't mess
up with callers expecting that to happen in a signal handler.

If the sequence gets claimed somewhere else in the event widget
stack, the DnD gesture will be cancelled.
2014-05-23 19:54:24 +02:00
Matthias Clasen
aab1610d40 DND: go back to a timeout for cancel animation
Using a tick callback does not really make sense here, since we
are not drawing in a window, but moving a toplevel around.
https://bugzilla.gnome.org/show_bug.cgi?id=728183
2014-04-22 23:45:59 -04:00
Jason Ekstrand
f02663532d Get rid of a stray character 2014-04-22 22:28:34 -04:00
Matthias Clasen
6193b9b640 csd: Fix drag hightlight drawing
When making the entire window a drop target, as file-roller does,
we don't want to draw the drag highlight around the CSD window
decorations.
https://bugzilla.gnome.org/show_bug.cgi?id=728526
 Please enter the commit message for your changes. Lines starting
2014-04-22 21:19:21 -04:00
Bastien Nocera
f71f7215ab all: Name more idles and timeouts
Following up from 438cd857c4,
name more timeouts and idles.

The original grep was missing checking for gdk_threads_add_*()
functions (at least for some of the files).

https://bugzilla.gnome.org/show_bug.cgi?id=726870
2014-03-26 20:09:30 -04:00
William Jon McCann
469d333aa2 docs: use Returns: consistently
Instead of Return value:
2014-02-19 18:56:05 -05:00
Matthias Clasen
7f6a964c47 Docs: Remove all entities and turn off sgml mode
With all element markup gone, it is time to turn off
sgml mode, and get rid of entities as well.
2014-02-09 17:58:07 -05:00
William Jon McCann
fa3f1e1488 docs: use apostrophe in *'ve 2014-02-07 13:38:26 -05:00
William Jon McCann
e34bd4137d docs: use apostrophes in *n't 2014-02-07 13:32:47 -05:00
William Jon McCann
7a208fbbf3 docs: use proper apostrophe
https://wiki.gnome.org/Design/OS/Typography
2014-02-07 13:06:10 -05:00
William Jon McCann
0ce016650b docs: Use markup for links 2014-02-07 09:42:12 -05:00
William Jon McCann
2a45418b67 docs: use proper quotes 2014-02-05 15:08:42 -05:00
William Jon McCann
4c8bd8e7cf docs: Identify examples that are C code
https://bugzilla.gnome.org/show_bug.cgi?id=723119
2014-01-29 12:45:49 -05:00
Matthias Clasen
e1d9974537 Drop internal uses of gtk_widget_get_root_window
This function is just a one-line convenience function that
is about to be deprecated.
2014-01-24 20:16:33 -05:00
William Jon McCann
93138e96c1 docs: don't reference nonexisting type in docs 2014-01-21 23:20:38 -05:00
William Jon McCann
7eb8577e3e docs: fix selections documentation link 2014-01-21 18:57:40 -05:00
Matthias Clasen
8d3a91d6ba docs: Add a missing Since: tag 2013-12-05 09:08:35 -05:00
Bastien Nocera
438cd857c4 all: Add names to timeouts
Add names to every timeout we setup, so it's easier to track their
usage, and debug possible misbehaviour.

https://bugzilla.gnome.org/show_bug.cgi?id=710651
2013-10-23 13:31:18 +02:00
Jasper St. Pierre
030b62d122 gtkdnd: Introduce a new API for more accurate drag origin data
When trying to drag, we currently the position of the first motion
event to determine where the drag came from. This might be alright
in the case of the old animation, but the data will be inaccurate
if the user has moved the pointer quite a bit since pressing the
cursor to start dragging. While we could monkey patch the GdkEvent
at the widget layer, this is unintuitive and strange.

Add a new API that takes a set of pointer coordinates describing
the origin of the drag. Additionally, adapt most widgets to use
it and use it with correct coordinates.

https://bugzilla.gnome.org/show_bug.cgi?id=705605
2013-08-14 07:12:52 -04:00
Jasper St. Pierre
e80d1f0523 gtkdnd: Use a more modern spring back animation for cancelled drags
https://bugzilla.gnome.org/show_bug.cgi?id=705605
2013-08-14 07:12:52 -04:00
Christian Hergert
a0bc600140 dnd: Motif DnD is no longer supported, update docs. 2013-08-08 16:06:00 +02:00
Jasper St. Pierre
b9d85b9412 gtkdnd: Clean up the doc comment of gtk_drag_begin 2013-08-07 11:53:04 -04:00
Alexander Larsson
8e423ba292 gtkdnd: Use surface based cursor APIs
This allows things to correctly scale things on HiDPI screens.
2013-08-07 13:34:10 +02:00
Alexander Larsson
0296f1a43a gtkdnd: Use RGBA windows when dragging if possible
If we have rgba visuals and a composited screen we should
just use a RGBA window rather than shaped windows.
2013-08-05 16:49:18 +02:00
Matthias Clasen
2f1fa7cdc3 Drop some unnecessary includes
Drop includes of deprecated headers where they are
no longer needed.
2013-07-19 22:32:23 -04:00
Matthias Clasen
0aa57d26b5 Move wholly deprecated classes to gtk/deprecated/
We've recently a number of classes wholly. For these cases,
move the headers and sources to gtk/deprecated/ and adjust
Makefiles and includes accordingly.

Affected classes:
GtkAction
GtkActionGroup
GtkActivatable
GtkIconFactory
GtkImageMenuItem
GtkRadioAction
GtkRecentAction
GtkStock
GtkToggleAction
GtkUIManager
2013-07-19 21:39:47 -04:00
William Jon McCann
424e1d0059 Start deprecating some GtkStock API 2013-06-25 19:05:32 -04:00
William Jon McCann
02c793f24a Start migrating internals away from GtkStock 2013-06-24 22:20:49 -04:00
ammonkey
4445dce697 fix mem leak in gtk_drag_set_icon_surface, destroy pattern
https://bugzilla.gnome.org/show_bug.cgi?id=681446
2013-04-13 20:06:43 -04:00
Matthias Clasen
329f7af159 Fix DND
The removal of the Motif DND code accidentally changed the
value of the TARGET_DELETE enumeration value, breaking DND
pretty badly.
2013-03-21 00:00:19 -04:00
Matthias Clasen
0cc688aa92 Drop the Motif DND protocol
The implementation is not working and unused, since XDND is the
de-facto standard under X nowadays.

https://bugzilla.gnome.org/show_bug.cgi?id=695476
2013-03-12 20:03:19 -04:00
Matthias Clasen
02e9152738 Fix DND with frame sync
Mutter magically ignores override-redirect windows with geometry
-100-100+1+1, and this breaks the frame synchronization between
gtk+ and mutter. For now, we avoid the issue by simply giving
the window a different geometry.
https://bugzilla.gnome.org/show_bug.cgi?id=694217
2013-02-28 07:48:06 -05:00
Matthias Clasen
2661403f88 Fix DND keyboard control with XI2
We are using XI2 to grab the key events, but we did not do the
necessary extra work to make GDK deliver root window events to us.

https://bugzilla.gnome.org/show_bug.cgi?id=681006
2012-08-06 22:56:59 -04:00
Javier Jardón
9d0febc9a6 Change FSF Address 2012-02-27 17:06:11 +00:00
Carlos Garcia Campos
6e9b06028c gtkdnd: Use symbolic names for button numbers 2012-01-27 09:47:43 +01:00
Alexander Larsson
6afeb8d355 Move fallback dnd cursors to resources 2012-01-16 14:19:19 +01:00
Javier Jardón
d005b01319 gtk/*: Use g_list_free_full() convenience function 2012-01-05 04:22:43 +01:00
Cosimo Cecchi
adbfbb7278 dnd: port to GtkIconHelper 2011-11-30 16:39:59 -05:00
Bastien Nocera
0888e6f485 gtk: Fix XIGrabKeycode usage
A modifier of "0" is still a modifier and must be submitted normally.
A num_modifiers of 0 is essentially a noop in the server.

As mentioned by Peter Hutterer <peter.hutterer@who-t.net>

https://bugzilla.gnome.org/show_bug.cgi?id=662839
2011-10-28 12:03:22 +01:00