Carlos Garnacho
f1168c5012
gdksurface: Do not consider GDK_TOUCH_END/CANCEL as popup-dismiss worthy
...
GDK_TOUCH_END deserves the same treatment than GDK_BUTTON_RELEASE, since it's
subject to the same circumstances (popping up a menu on long press would be
immediately dismissed on release if we handled them there). Ideally, we would
want to match releases that we obtained a press for while grabbed, but as
the popup is also dismissed on GDK_BUTTON_PRESS/GDK_TOUCH_BEGIN, there's no
use for this tracking.
And GDK_TOUCH_CANCEL sounds weird as a reason to dismiss popups, just like
crossing events would.
Related: https://gitlab.gnome.org/GNOME/mutter/-/issues/2512
2022-11-18 17:56:14 +01:00
Carlos Garnacho
ae54374a51
gtktext: Claim gesture more selectively
...
Even though button 1 (or touch down) presses do most often have
an effect in one way or another (starting drag, moving focus,
starting selection, ...), there is one situation that they do
immediately nothing: When clicking on the entry does not move
the text caret around. Dragging might start a selection, but
the entry did not do anything just yet, and an immediate
button/touch release should remain at "did nothing".
And that is precisely the hint that the Wayland IM context's click
gesture takes, clicks that do not scroll nor move the caret around,
having the GtkText not claim the gesture in that situation makes
the IM gesture able to do its thing without in-fighting.
This is typically not a problem when the GtkText is embedded in
another GtkEditable implementation (e.g. GtkEntry), since the
IM gesture is inactive and capturing from the parent widget, so
gets a pass that it otherwise doesn't get when both gestures are
in the same widget. This makes it work regardless of GtkText not
being a child of a composite widget, like NautilusQueryEditor
and AdwRowEntry.
Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/5351
2022-11-18 17:56:14 +01:00
Matthias Clasen
64b8a8740f
Merge branch 'wip/fix-tiling-without-gtk-shell' into 'main'
...
wayland/surface: Set the tiling state from xdg-shell too
See merge request GNOME/gtk!5227
2022-11-18 16:33:25 +00:00
Jonas Ådahl
07a59da6e4
wayland/surface: Set the tiling state from xdg-shell too
...
We plumbed it from the gtk-shell configure event, but didn't for the
equivalent state passed via xdg_toplevel.configure.
2022-11-18 13:11:25 +01:00
Matthias Clasen
dfbaeefc64
Merge branch 'matthiasc/for-main' into 'main'
...
gsk: Add an assertion to help static analysis
See merge request GNOME/gtk!5224
2022-11-18 05:22:44 +00:00
Matthias Clasen
9cbfbbdf39
stringsorter: Fix one case of collation handling
...
When not ignoring case, and not collating, we were
returning sort keys that were already freed. Oops.
Pointed out by clang.
2022-11-18 00:04:23 -05:00
Matthias Clasen
8c1a041104
gdk: Fix possible memory errors
...
clang complained that we may end up jumping
to the cleanup code without initializing data
in the jpeg code. Always initialize data to
NULL to prevent that eventuality.
2022-11-18 00:04:23 -05:00
Matthias Clasen
95fc5109bb
composetable: Fix a memory leak
...
Pointed out by clang.
2022-11-18 00:04:23 -05:00
Matthias Clasen
ce57150203
gsk: Add an assertion to help static analysis
...
clang gets wild ideas about negative radii otherwise.
2022-11-18 00:04:23 -05:00
Matthias Clasen
203685a46a
Merge branch 'matthiasc/for-main' into 'main'
...
Fix spelling errors
See merge request GNOME/gtk!5223
2022-11-18 04:56:57 +00:00
Matthias Clasen
ebe6d52252
Drop redundant glib version checks
...
We require GLib 2.72 now.
2022-11-17 22:49:56 -05:00
Matthias Clasen
60aaf38f39
gdk: Clean up gdkprivate.h
...
Move apis to more specific headers.
2022-11-17 22:49:56 -05:00
Matthias Clasen
2bab8cca5f
gdk: Rename GDK_SURFACE_TEMP
...
We use this value only for drag surfaces, so call it that.
2022-11-17 22:49:56 -05:00
Matthias Clasen
b12d31d189
Fix spelling errors
...
These were pointed out by codespell.
2022-11-17 22:49:45 -05:00
Matthias Clasen
0d2161ee40
Merge branch 'file-dialog-portals' into 'main'
...
file dialog: Use portals
See merge request GNOME/gtk!5221
2022-11-18 03:49:30 +00:00
Matthias Clasen
cda06f375e
Merge branch 'matthiasc/for-main' into 'main'
...
gtk-demo: Add some keywords
See merge request GNOME/gtk!5220
2022-11-17 20:53:51 +00:00
Matthias Clasen
b0148972fd
filedialog: Use portals
...
We want this new API to be portal-first.
Make it so.
2022-11-17 15:52:53 -05:00
Matthias Clasen
ea3c58f0ec
gtk-demo: Add folders to the clipboard demo
...
This is handy for testing a case where folder
dnd does not work with the file transfer portal.
See #5348
2022-11-17 06:31:09 -05:00
Matthias Clasen
af8ad1efe8
gtk-demo: Add some keywords
...
Make sure that dnd and drag-and-drop yield the right
(and the same) set of demos.
2022-11-17 05:50:34 -05:00
Matthias Clasen
12a50735da
Merge branch 'ccook/doc-spelling-fixes' into 'main'
...
doc fix: various spelling mistakes corrected
See merge request GNOME/gtk!5215
2022-11-17 10:28:38 +00:00
Luca Bacci
7c62eaa528
Merge branch 'win32-hotspot' into 'main'
...
gdk/win32: fix cursor hotspot
See merge request GNOME/gtk!5216
2022-11-17 09:06:55 +00:00
Cam Cook
2a14753739
Merge branch 'main' into ccook/doc-spelling-fixes
2022-11-16 23:23:42 -05:00
Cam Cook
4ccc3b53eb
doc/spelling changes: gtkselectionmodel.c, 'call this when the* selection changes'
2022-11-16 23:20:50 -05:00
Matthias Clasen
793954055e
Merge branch 'radioactiveman-main-patch-52462' into 'main'
...
label: Fix markup doc example
See merge request GNOME/gtk!5201
2022-11-17 03:46:43 +00:00
Thomas Lange
7adf720f08
label: Fix markup doc example
2022-11-17 03:46:01 +00:00
Emmanuele Bassi
dc168767b0
Merge branch 'ebassi/list-doc-links' into 'main'
...
docs: Add links to the list widgets table
See merge request GNOME/gtk!5210
2022-11-16 21:51:59 +00:00
Matthias Clasen
501577196a
Merge branch 'matthiasc/for-main' into 'main'
...
Inspector: Add a missing event type
See merge request GNOME/gtk!5218
2022-11-16 19:24:54 +00:00
Matthias Clasen
69d59d9b8b
Merge branch 'filechooser-set-choice-fix' into 'main'
...
filechooser: Fix gtk_file_chooser_set_choice again
Closes #5346
See merge request GNOME/gtk!5219
2022-11-16 19:23:05 +00:00
robxnano
adc0264dac
filechooser: Fix gtk_file_chooser_set_choice again
...
If the choice was in the form of a GtkDropDown, the code failed to
find the widget and so the choice never got set. Fixes #5346 .
2022-11-16 18:07:20 +00:00
Marc-André Lureau
437a359f1b
gdk/win32: fix cursor hotspot
...
This seems to be a regression from commit c06b1cc103
"Win32: Re-work cursor handling".
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-11-16 11:50:56 +04:00
Matthias Clasen
4eb017904b
Alertdialog: Cosmetics
2022-11-15 10:36:32 +00:00
Matthias Clasen
5aeb6c31c0
events: Drop an unused variable
2022-11-15 10:26:25 +00:00
Matthias Clasen
c9df9978d2
Inspector: Add a missing event type
...
We did not have a name for the new touchpad hold
events.
To prevent this from happening again in the future,
add a static assertion.
2022-11-15 07:18:41 +01:00
Cam Cook
d1bb927286
Documentation fix: Various spelling mistakes (and one use of the wrong verb) across a few domains that show up in documentation.
...
| domain | current | suggestion |
|--------|---------|------------|
| [GtkButton](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkbutton.c#L691 ) | "Buttons can has a flat appearance" | "Buttons can have a flat appearance" |
| [GtkCenterBox](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkcenterbox.c#L275 ) | "pas %NULL" | "pass %NULL" |
| [GtkEditable](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkeditable.c#L466 ) | "the text to append" | "the text to insert" |
| [GtkFlowbox](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkflowbox.c#L4921 ) | "the are equal" | "they are equal" |
| [GtkSelectionModel](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkselectionmodel.c#L550 ) | "Call this when a the selection changes" | "Call this when a selection changes" |
| [GtkWIndow](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkwindow.c#L5321 ) | "(e.g. the user or the window manager" | "(e.g. the user or the window manager)" |
2022-11-13 11:55:05 -05:00
Emmanuele Bassi
bd66198b88
docs: Add more links to the list widgets description
2022-11-11 11:30:41 +00:00
Emmanuele Bassi
5193846787
docs: Add links to the list widgets table
...
Make it easier for readers to go to the appropriate replacement for the
old GtkTreeView-and-friends API.
2022-11-11 11:21:17 +00:00
Matthias Clasen
2daea9e459
Merge branch 'focus-no-parent' into 'main'
...
focus: fall back to old behaviour if we didn't focus anything
See merge request GNOME/gtk!5189
2022-11-11 10:29:00 +00:00
Matthias Clasen
2d48793641
Merge branch 'docs-update' into 'main'
...
docs: Update Common Questions section on list views
See merge request GNOME/gtk!5209
2022-11-11 10:28:11 +00:00
Arjan Molenaar
920f49e993
Fix typo in 4 to 5 migration page
2022-11-10 22:41:26 +01:00
Arjan Molenaar
29d7f93e38
Update Common Questions section on tree views
...
Point users to GtkListView instead of the
deprecated GtkTreeView.
2022-11-10 22:41:26 +01:00
Matthias Clasen
df5a13806d
Merge branch 'gdkwaylandtoplevel' into 'main'
...
gdk/wayland/surface: Move more members to `GdkWaylandPopup` and `GdkWaylandToplevel`
See merge request GNOME/gtk!4227
2022-11-10 13:58:24 +00:00
Luca Bacci
aebbf7cc61
Merge branch 'win32-inhibit' into 'main'
...
gdk-win32: implement basic inhibit-system-shortcuts
See merge request GNOME/gtk!5206
2022-11-10 11:18:23 +00:00
Matthias Clasen
fc8ef02bb5
Merge branch 'export-handle-refactor' into 'main'
...
Refactor surface handle export
See merge request GNOME/gtk!5205
2022-11-10 08:00:07 +00:00
Marc-André Lureau
cf04a3c99d
gdk-win32: implement basic inhibit-system-shortcuts
...
This is largely adapted from commit 83027c68f1
("11: Implement
inhibit_system_shortcuts API"), with similar rationale:
To implement the inhibit_system_shortcuts API on X11, we emulate the
same behavior using grabs on the keyboard.
To avoid keeping active grabs on the keyboard that would affect
other X11 applications even when the surface isn't focused, the X11
implementation takes care of releasing the grabs as soon as the
toplevel loses focus.
Note that Windows has low-level keyboard hooks that could help achieve
the expected behaviour. This is implemented by spice-gtk & gtk-vnc for
example, but correctness isn't obvious. I left a TODO comment.
This patch helps implementing remote desktop widgets with GTK4, since
currently on win32 backend Alt-Tab and such are always left to the
system unless there is keyboard grab (which can't be requested by the
client API anymore, afaict).
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-11-09 19:29:03 +04:00
Matthias Clasen
43d6682e45
wayland: Reimplement export_handle
...
Reimplement the backend API on top of the new async
calls.
2022-11-09 16:28:30 +01:00
Matthias Clasen
d1bdc36331
window: fixups
2022-11-09 16:28:30 +01:00
Matthias Clasen
dcc3b638aa
wayland: fixups
2022-11-09 16:28:30 +01:00
Matthias Clasen
4b40aeb0c6
wayland: Support the v2 protocol in both places
...
The old api should better support both versions of the
foreign protocol too.
2022-11-09 16:28:29 +01:00
Matthias Clasen
0ba8e16e14
wayland: Add zxdg_foreign_v2 protocol support
2022-11-09 16:28:29 +01:00
Matthias Clasen
f9982a61e6
window: Use gdk_toplevel_export_handle
2022-11-09 16:28:29 +01:00