Carlos Garnacho [Wed, 6 Jun 2018 23:09:05 +0000 (01:09 +0200)]
gtkspinbutton: Use GtkEventControllerKey
And drop the ::event vfunc implementation with it.
Carlos Garnacho [Wed, 6 Jun 2018 22:49:04 +0000 (00:49 +0200)]
gtkfontchooser: Use GtkEventControllerKey
Use an event controller on GtkFontChooserDialog, a nice side effect
is that we can use gtk_event_controller_key_forward() and
gtk_search_entry_set_key_capture_widget() instead of passing events
around for dialog search.
Carlos Garnacho [Wed, 6 Jun 2018 15:27:22 +0000 (17:27 +0200)]
gtkfilechooserwidget: Drop usage of ::event vmethod
Use a key controller set up in the UI file instead.
Carlos Garnacho [Wed, 6 Jun 2018 13:57:22 +0000 (15:57 +0200)]
gtkfilechooserentry: Use GtkEntry key controller for focus-out handling
Expose the GtkEntry key controller in private API, so we don't have to
create yet another one just to handle focus-out.
Carlos Garnacho [Wed, 6 Jun 2018 11:52:08 +0000 (13:52 +0200)]
gtkentry: Use gestures for entry icons
Instead of doing all handling manually in the ::event vfunc,
set up drag/multipress gestures on icon images, and implement
emission of ::icon-press/release and DnD there.
As a side effect, the GdkEvent field in ::icon-press/release
signals has been dropped. Callers that might be interested on it
may still use gtk_get_current_event*().
Carlos Garnacho [Tue, 5 Jun 2018 13:57:53 +0000 (15:57 +0200)]
gtkbutton: remove keyboard device GTK+ grab
This isn't really necessary, if keyboard focus forcibly goes somewhere
else we will get ::grab-notify, which is sufficient to deactivate the
button again.
Carlos Garnacho [Tue, 5 Jun 2018 12:34:36 +0000 (14:34 +0200)]
gtkbutton: Use key controller for button (de)activation through keybindings
And stop using GtkWidget::event for good.
Matthias Clasen [Wed, 20 Jun 2018 22:06:35 +0000 (18:06 -0400)]
x11: Fix dnd action handling
We were mistakenly assigning an Atom to a flags value.
Daniel Boles [Wed, 20 Jun 2018 19:51:50 +0000 (20:51 +0100)]
EmojiCompletion: Avoid another un/signed warning
The cherry-pick missed this, I guess.
Daniel Boles [Wed, 20 Jun 2018 19:36:19 +0000 (20:36 +0100)]
EmojiCompletion: Avoid un/signed compare warnings
(A) Use gsize to match the result of g_variant_n_children
(B) Use guint for n_matches, like the struct (and all other n_matches)
Daniel Boles [Wed, 20 Jun 2018 19:11:26 +0000 (20:11 +0100)]
themes: Remove leftover bit of .linked workaround
Now that .linked acts like the .path-bar already did, there is no point
in applying the same styles again (with higher specificity).
Timm Bäder [Wed, 20 Jun 2018 18:42:01 +0000 (20:42 +0200)]
container: Remove SPECIAL_CONTAINER hack
As discussed in !129
Closes !129
Timm Bäder [Wed, 20 Jun 2018 18:22:52 +0000 (20:22 +0200)]
stackswitcher: Remove icon-size property
This ought to be controlled via css these days.
Timm Bäder [Wed, 20 Jun 2018 18:05:06 +0000 (20:05 +0200)]
infobar: Remove priv pointer
Timm Bäder [Wed, 20 Jun 2018 12:56:35 +0000 (14:56 +0200)]
Remove some unnecessary snapshot implementations
Timm Bäder [Wed, 20 Jun 2018 12:24:21 +0000 (14:24 +0200)]
fixed: Remove priv pointer
Timm Bäder [Wed, 20 Jun 2018 10:55:14 +0000 (12:55 +0200)]
listbox: Use widget insert API instead of fiddling with CSS nodes
Timm Bäder [Wed, 20 Jun 2018 07:07:51 +0000 (09:07 +0200)]
button: Remove ICON_SIZE_BUTTON mention in docs
The icon will have the size given by css, not whatever
GTK_ICON_SIZE_BUTTON was.
Timm Bäder [Fri, 23 Mar 2018 13:32:10 +0000 (14:32 +0100)]
adjustment: Only emit ::changed from dispatch_properties_changed
Timm Bäder [Fri, 23 Mar 2018 13:22:45 +0000 (14:22 +0100)]
adjustment: Remove adjustment_changed_stamp
Timm Bäder [Fri, 23 Mar 2018 12:55:01 +0000 (13:55 +0100)]
testsuite: Print tested property name in notify test
Timm Bäder [Fri, 23 Mar 2018 12:48:31 +0000 (13:48 +0100)]
adjustment: Use public setters in set_property
Daniel Boles [Wed, 20 Jun 2018 18:25:04 +0000 (19:25 +0100)]
themes: Regenerate CSS for recent commits
e.g. the box.linked one, which didn't update the compiled CSS.
Daniel Boles [Wed, 20 Jun 2018 18:23:59 +0000 (19:23 +0100)]
HC: Avoid excessive selectors from prev commit
The new rule does not need to affect all those other pseudoclasses. I
just put it in the wrong scope.
Daniel Boles [Wed, 20 Jun 2018 17:32:49 +0000 (18:32 +0100)]
HC: Avoid same BG/FG colors in flat treeview entry
Selected rows in tree views in HighContrast have a background colour the
same or nearly as the normal text colour, so we cannot let entries in
such rows have transparent backgrounds, or the text inside the entry
becomes nearly or totally impossible to see.
Dodge this by giving entry.flat inside treeview and with :focus the
$base_color, which is different from the text & so lets that be seen.
https://gitlab.gnome.org/GNOME/gtk/merge_requests/125
Daniel Boles [Wed, 20 Jun 2018 08:54:16 +0000 (09:54 +0100)]
searchenginetracker: Don't leak the hits' GFiles
https://gitlab.gnome.org/GNOME/gtk/merge_requests/206
Matthias Clasen [Wed, 20 Jun 2018 15:34:51 +0000 (15:34 +0000)]
Merge branch 'issue1084' into 'master'
application: Complete the startup sequence before quitting remote instances
Closes #979
See merge request GNOME/gtk!156
Matthias Clasen [Wed, 20 Jun 2018 14:21:24 +0000 (14:21 +0000)]
Merge branch 'master' into 'issue1084'
# Conflicts:
# gdk/gdk.c
Timm Bäder [Mon, 18 Jun 2018 19:50:33 +0000 (21:50 +0200)]
window: Remove priv pointer
Timm Bäder [Mon, 18 Jun 2018 19:18:34 +0000 (21:18 +0200)]
pathbar: Remove unused define
Matthias Clasen [Tue, 19 Jun 2018 20:59:20 +0000 (16:59 -0400)]
docs: Remove a duplicate line in gdk4-sections.txt
This was causing another docs build break.
Matthias Clasen [Tue, 19 Jun 2018 20:46:53 +0000 (16:46 -0400)]
docs: fix a typo
Invalid syntax in gdk4-sections.txt was causing docs builds to fail.
Daniel Boles [Tue, 19 Jun 2018 20:22:38 +0000 (20:22 +0000)]
Merge branch '1160-crash-clearing-gtkentry-icon-tooltip-master' into 'master'
Resolve "Crash clearing GtkEntry icon tooltip"
Closes #1160
See merge request GNOME/gtk!205
Benjamin Otte [Tue, 19 Jun 2018 19:45:44 +0000 (21:45 +0200)]
win32: Fix typo
This should fix gtk-doc erroring out.
Benjamin Otte [Tue, 19 Jun 2018 17:54:19 +0000 (19:54 +0200)]
Revert "Add aligned allocator functions to GSK"
This reverts commit
8e74eb382f0c617b7b65a6850952d6acc9fd3018.
This code is not necessary. It worked around a bug in graphene where
graphene was requiring stricter alignment than glib allocators could
guarantee.
Benjamin Otte [Tue, 19 Jun 2018 17:52:52 +0000 (19:52 +0200)]
Revert "Use aligned allocators for GtkSnapshot"
This reverts commit
c02bc22cc575470aab870599f2781c3781fb75e6.
This code is not necessary.
The bug causing this problem ws prsent in the graphene library.
Benjamin Otte [Tue, 19 Jun 2018 17:43:12 +0000 (19:43 +0200)]
rendernodepaintable: Fix rendering position
When the given size had an offset, we were moving that offset in the
wrong direction.
Benjamin Otte [Tue, 19 Jun 2018 17:41:49 +0000 (19:41 +0200)]
dnd: Use a GtkPicture in gtk_dnd_set_icon_paintable()
We don't want to get the paintable scaled down to icon size.
Also set can-shrink = FALSE to replicate GTK3 behavior with size
requests.
Benjamin Otte [Tue, 19 Jun 2018 17:40:37 +0000 (19:40 +0200)]
snapshot: Compute correct size in gtk_snapshot_to_paintable()
Also, do actually respect the passed in size argument if it isn't NULL.
Fixes text being cut off inside DND icons.
Benjamin Otte [Tue, 19 Jun 2018 14:47:36 +0000 (16:47 +0200)]
dnd: gdk_drag_action_is_unique() should return a boolean
Daniel Boles [Tue, 19 Jun 2018 17:30:34 +0000 (18:30 +0100)]
a11y/entry: Fix copy-pasteo re 2ndary icon tooltip
The else case was wrongly resetting the accessible description on the
primary icon, which might not exist and can therefore cause a crash.
https://gitlab.gnome.org/GNOME/gtk/issues/1160
Matthias Clasen [Tue, 19 Jun 2018 16:40:39 +0000 (16:40 +0000)]
Merge branch 'wip/carlosg/issue-1159' into 'master'
Fix issue 1159
Closes #1159
See merge request GNOME/gtk!202
Piotr Drąg [Tue, 19 Jun 2018 15:52:13 +0000 (17:52 +0200)]
Update POTFILES.in
myfreeweb [Tue, 19 Jun 2018 14:49:18 +0000 (14:49 +0000)]
wayland: Use shm_open(SHM_ANON) on FreeBSD
This functionality is similar to Linux's memfd. It creates anonymous shared memory without touching the filesystem, which allows it to work in Capsicum capability mode (sandbox).
Carlos Garnacho [Tue, 19 Jun 2018 11:38:09 +0000 (13:38 +0200)]
gtkgesture: Check claimed status after event delivery
The claimed status check should happen after ::end is emitted,
as the gesture may deny the sequence that much late. In this
case the event should keep propagating.
https://gitlab.gnome.org/GNOME/gtk/issues/1159
Closes: #1159
Carlos Garnacho [Tue, 19 Jun 2018 11:17:57 +0000 (13:17 +0200)]
gtkwidget: Avoid doubly coordinate conversion when emulating press
We are poking again into the event propagation machinery, which
expects events in toplevel coordinates. Since we can't fetch the
original event back at this point, translate the coordinates
back to the toplevel so the emulated press ends up in the right
place.
https://gitlab.gnome.org/GNOME/gtk/issues/1159
Closes: #1159
Benjamin Otte [Mon, 18 Jun 2018 14:26:06 +0000 (16:26 +0200)]
x11: Set background as transparent as possible
Instead of making the background black, make it transparent black for
RGBA visuals and set a None background otherwise.
Benjamin Otte [Sat, 16 Jun 2018 02:49:47 +0000 (04:49 +0200)]
widget: Remove time argument from drag_data_get() vfunc
Benjamin Otte [Sat, 16 Jun 2018 02:34:48 +0000 (04:34 +0200)]
dnd: Remove unused time arguments
Benjamin Otte [Fri, 15 Jun 2018 06:39:51 +0000 (08:39 +0200)]
dnd: Remove GdkDragContext.dest_surface
The variable is now unused
Руслан Ижбулатов [Sat, 16 Jun 2018 17:18:54 +0000 (17:18 +0000)]
GDK W32: Remove gdk_win32_surface_foreign_new_for_display
That function is now unused.
Руслан Ижбулатов [Sat, 16 Jun 2018 17:13:19 +0000 (17:13 +0000)]
GDK W32: Adapt to dest_surface removal, misc changes
* There's no GdkDragContext->dest_surface anymore.
Add dest_window field to GdkWin32DragContext,
and use that instead.
* Remove unused function prototypes
* Add more comments
* Rename variables and fields from 'window' to 'surface'
where appropriate
* Fix header indentation a bit
* Try to ensure that uninitialized/unknown handle variables
and fields are set to INVALID_HANDLE_VALUE instead of NULL,
as there may be cases where NULL is a valid handle value.
Benjamin Otte [Fri, 15 Jun 2018 06:48:27 +0000 (08:48 +0200)]
dnd: Remove GdkDragContext.is_source
All drag contexts are sources these days, the other ones are GdkDrop
now.
Benjamin Otte [Fri, 15 Jun 2018 06:38:19 +0000 (08:38 +0200)]
x11: Remove gdk_x11_surface_foreign_new_for_display()
People who want to use foreign windows should use X directly.
Benjamin Otte [Fri, 15 Jun 2018 06:35:14 +0000 (08:35 +0200)]
x11: Store the XID instead of a GdkSurface
This might be foreign Windows and we don't want to create surfaces for
those.
Also, stop using GdkDragContext.dest_surface, that variable is meant to
go away.
Benjamin Otte [Fri, 15 Jun 2018 06:12:33 +0000 (08:12 +0200)]
x11: Simplify test
Now that we have gdk_drag_context_get_display(), use it.
Benjamin Otte [Fri, 15 Jun 2018 06:00:41 +0000 (08:00 +0200)]
x11: xdnd_send_event() always returns TRUE
Make it return nothing instead and delete the code that handled the
FALSE case.
Benjamin Otte [Fri, 15 Jun 2018 05:57:45 +0000 (07:57 +0200)]
x11: Don't multiply X values by the scale factor
This is fallout from a too eager change in
bdb442be21471a91820219347b1345ed7b84d034.
Benjamin Otte [Thu, 14 Jun 2018 03:13:13 +0000 (05:13 +0200)]
dnd: Make the base Drag/Drop types abstract
This way, they'll be ignored by the testsuite.
And we don't want to instantiate them anyway, the backends have
their own subclasses.
Benjamin Otte [Thu, 14 Jun 2018 02:58:50 +0000 (04:58 +0200)]
dnd: GdkDragContext is no longer a GdkDrop subclass
This includes a bunch of header cleanup
Benjamin Otte [Thu, 14 Jun 2018 02:57:10 +0000 (04:57 +0200)]
dnd: Remove gdk_drag_status() and gdk_drag_finish()
Those functions are unused and have been replaced by their equivalents
gdk_drop_status() and gdk_drop_finish().
Benjamin Otte [Thu, 14 Jun 2018 02:13:59 +0000 (04:13 +0200)]
surface: Kill event masks
In particular, this patch removes:
gdk_surface_get_events()
gdk_surface_set_events()
gdk_surface_get_device_events()
gdk_surface_set_device_events()
Event masks so far still exist for grabs.
Benjamin Otte [Thu, 14 Jun 2018 01:41:57 +0000 (03:41 +0200)]
x11: Store the source surface as an XID
Don't create a foreign GDK surface, just store the XID.
With this, we can avoid GDK APIs that we want to get rid of and just
use the X counterpart.
Benjamin Otte [Thu, 14 Jun 2018 00:47:56 +0000 (02:47 +0200)]
x11: Split drag and drop contexts
While doing so, turn the drop context into a GdkDrop subclass and no
longer pretend to be a GdkDragContext.
Benjamin Otte [Wed, 13 Jun 2018 19:36:23 +0000 (21:36 +0200)]
x11: Handle events on drag side differently
Instead of using the filters that the drop side uses, handle events in
the event filter installed by the DragContext.
Benjamin Otte [Wed, 13 Jun 2018 13:30:43 +0000 (15:30 +0200)]
x11: Change the way local Drop => Drag is shortcut
This is one step further towards untangling drag and drop parts of X11
DND.
Benjamin Otte [Wed, 13 Jun 2018 03:41:39 +0000 (05:41 +0200)]
x11: Remove unused argument
The propagate argument is always FALSE, so just use FALSE everywhere.
Benjamin Otte [Wed, 13 Jun 2018 03:32:08 +0000 (05:32 +0200)]
x11: switch a bunch of variable types
GdkDragContext => GdkDrop
This is all in preparation of separation of the drag and drop.
Also, don't check for GDK_DRAG_PROTO_XDND anymore - it's the only
possible value for the protocol on the target side.
Benjamin Otte [Wed, 13 Jun 2018 02:54:27 +0000 (04:54 +0200)]
broadway: Remove unused variable
Benjamin Otte [Wed, 6 Jun 2018 05:43:58 +0000 (07:43 +0200)]
dnd: Remove gdk_drag_context_get_dest_surface()
... and gdk_drag_context_get_source_surface().
In the backends, use direct access to the variables instead.
Benjamin Otte [Thu, 7 Jun 2018 03:18:52 +0000 (05:18 +0200)]
dnd: Implement gtk_drag_get_source_widget() differently
Instead of keeping a list of source contexts, just use the current
drag's info.
Benjamin Otte [Wed, 6 Jun 2018 02:55:55 +0000 (04:55 +0200)]
x11: Replace the hardcoded DND filter
Use the new method of connecting to the xevent signal instead.
Also, don't consume the xevent, there might be other code listening for
it. And we don't use PropertyNotify in the generic code path anymore, so
it'll just be ignored there.
Руслан Ижбулатов [Tue, 5 Jun 2018 23:37:10 +0000 (23:37 +0000)]
GDK W32: Remove unused files
Руслан Ижбулатов [Tue, 5 Jun 2018 23:03:51 +0000 (23:03 +0000)]
GDK W32: Adapt to GdkDrop and GdkDragContext changes
* Remove clipdrop->dnd_target_state, it's not used anymore
* Remove non-functioning _gdk_dropfiles_store(), store dropfiles
list in GdkWin32Drop instead
* Fix multiple comment typos
* Fix _gdk_win32_get_clipboard_format_name_as_interned_mimetype() to
leave names that look like mime/types alone
* Refactor _gdk_win32_add_w32format_to_pairs() to populate
GdkContentFormatsBuilder directly, instead of making a GList
* Rename context -> drag (still using GdkDragContext type,
but [almost?] all variables and comments say "drag" now)
* Rename GdkDropContext -> GdkDrop
* Rename some parameter names for clarity
* Rewrite local protocol to look more like OLE2 protocol
instead of mirroring the structure of the X11 API.
* Add handle_events field to GdkWin32DragContext,
to shut off event handling (temporary fix until GTK is patched up)
* Remove _gdk_win32_drag_context_find() - the drag object is stored
in GdkDrop instead. Use _gdk_win32_find_drag_for_dest_surface()
to get it initially.
* Remove target_ctx_for_window, droptarget context is stored
in the surface instead.
* Call gdk_drag_context_set_cursor() just like wayland backend does
(slightly broken for now)
* Clean up the action choosing code (filter source actions by using
keyboard state, pass that to GTK, get all actions supported by GTK in
response, match them up with filtered source actions, return the
result, falling back to COPY in case of multiple actions)
* Check drag_win32->protocol instead of the use_ole2_dnd variable where
possible
* Remove protocol checks from functions that are only used by the local
protocol
* Use event state to manufacture the keyboard state for WM_MOUSEMOVE
* Change function names printed by GDK_NOTE to name the actual
functions, not their theoretical generic GDK stack ancestors
* Consistently use drag_win32 and drop_win32 variables instead of a mix
of that and win32_drag/win32_drop
* Return FALSE from button handler to ensure that GTK gets the button
event to break implicit grab
* Emit leave event on failed idroptarget_drop() calls
Benjamin Otte [Sat, 2 Jun 2018 04:24:23 +0000 (06:24 +0200)]
dnd: Add read_value() and read_text() functions to GdkDrop
These just copy what GdkClipboard does.
Benjamin Otte [Thu, 31 May 2018 19:45:22 +0000 (21:45 +0200)]
drop: Implement shortcut for local DND
Now that we have the drop->drag, we can use the same shortcut we use in
the clipboard code to shortcut DND operations.
Benjamin Otte [Thu, 31 May 2018 19:24:08 +0000 (21:24 +0200)]
x11: Pass the drag source when creating a drop context
Benjamin Otte [Thu, 31 May 2018 19:18:04 +0000 (21:18 +0200)]
x11: Find dest drops differently
Instead of looking at the list of contexts, just look at the current
drop context. There is only one, after all.
Then remove the is_source argument from gdk_drag_context_find().
Benjamin Otte [Thu, 31 May 2018 19:15:59 +0000 (21:15 +0200)]
wayland: Store the current drag operation
Use it to detect local drags when creating drop objects.
Benjamin Otte [Wed, 30 May 2018 19:12:43 +0000 (21:12 +0200)]
dnd: Move GdkDragAction to gdktypes.h
That way, both gdkdrag.h and gdkdrop.h can use it without one having to
include the other.
Benjamin Otte [Wed, 30 May 2018 19:04:05 +0000 (21:04 +0200)]
gdk: Remove leftover type from autocleanup
Benjamin Otte [Wed, 30 May 2018 02:37:47 +0000 (04:37 +0200)]
wayland: Get rid of GdkWaylandSelection
Move data source handling into the DND code instead.
Benjamin Otte [Wed, 30 May 2018 02:04:51 +0000 (04:04 +0200)]
wayland: Split drop context into GdkWaylandDrop
GdkWaylandDrop no longer inherits from GdkDragContext now.
Benjamin Otte [Wed, 30 May 2018 02:04:39 +0000 (04:04 +0200)]
wayland: Remove a bunch of unused functions
Benjamin Otte [Tue, 29 May 2018 18:49:41 +0000 (20:49 +0200)]
events: Make GdkEventDND have a GdkDrop member
... instead of a GdkDragContext.
Benjamin Otte [Tue, 29 May 2018 18:44:32 +0000 (20:44 +0200)]
x11: Refactor DND filter
The filters now return TRUE/FALSE and no longer a GdkFilterReturn. They
also don't conform to the GdkFilterFunc typedef anymore but instead take
the arguments that they need.
Benjamin Otte [Tue, 29 May 2018 17:13:24 +0000 (19:13 +0200)]
x11: Use new DND event emitters
Benjamin Otte [Tue, 29 May 2018 17:00:10 +0000 (19:00 +0200)]
win32: Use new DND event emitters
Benjamin Otte [Wed, 23 May 2018 18:11:28 +0000 (20:11 +0200)]
wayland: Use new DND event emitters
Benjamin Otte [Wed, 23 May 2018 17:41:54 +0000 (19:41 +0200)]
drop: Add private API for event emission
Benjamin Otte [Wed, 23 May 2018 16:30:14 +0000 (18:30 +0200)]
drop: Add GdkDrop:surface property
This replaces gdk_drag_context_get_dest_surface().
Benjamin Otte [Tue, 22 May 2018 17:43:43 +0000 (19:43 +0200)]
display: Don't wake up the main loop anymore
This is not needed because GTK must be run in the main thread these days,
which is the same one that runs the main loop. So when this function is
called, the main loop is awake.
https://bugzilla.gnome.org/show_bug.cgi?id=550989
Benjamin Otte [Tue, 22 May 2018 13:48:50 +0000 (15:48 +0200)]
x11: Don't sneakily allocate memory in initializers
Benjamin Otte [Tue, 22 May 2018 13:32:27 +0000 (15:32 +0200)]
dnd: Add gdk_event_get_drop()
And remove gdk_event_get_drag_context().
All GTK code now only uses GdkDrop for dropping.
Benjamin Otte [Sun, 20 May 2018 18:22:02 +0000 (20:22 +0200)]
wayland: Fix drop operations for new semantics
Benjamin Otte [Sun, 20 May 2018 18:15:39 +0000 (20:15 +0200)]
dnd: Remove GdkDragContext::commit_drag_status() vfunc
The idea behind the vfunc doesn't work as status updates can happen
asynchronously.
A better solution needs to be found.
Benjamin Otte [Thu, 17 May 2018 02:51:18 +0000 (04:51 +0200)]
dnd: Make drag-motion and drag-drop signals use GdkDrop
Benjamin Otte [Wed, 16 May 2018 02:50:24 +0000 (04:50 +0200)]
dnd: Make drag-data-received use a GdkDrop
Benjamin Otte [Wed, 16 May 2018 02:49:58 +0000 (04:49 +0200)]
drop: Add gdk_drop_get_drag()
For now, it'll always return NULL. We'll fix that later.
Benjamin Otte [Tue, 15 May 2018 22:59:01 +0000 (00:59 +0200)]
widget: Make GtkWidgetClass::drag_leave() take a GdkDrop
Drag Contexts are on their way out!