Commit Graph

53005 Commits

Author SHA1 Message Date
Emmanuele Bassi
fba09dbfc7 Mark surface as dirty before flushing it
If we're trying to read back the contents of a GdkWindow that was
created from a foreign windowing system surface, we are going to
forcibly mark it as dirty before flushing the Cairo state.

To avoid regressing any further in the future of the 3.x branch, let's
leave a comment.

Fixes: #5482
2023-02-12 19:19:25 +00:00
John Ralls
f931c73316 [quartz] Silence two compiler warnings.
One unused function, one return type mismatch.
2023-02-11 12:57:08 -08:00
John Ralls
312e5781f3 [quartz] Set the sRGB colorspace on the IOSurface.
Enables colorspace tranformation in Core Animation. This transform
is executed on the GPU and unlike the Core Graphics one has no
affect on performance.

Fixes #5579
2023-02-11 12:52:38 -08:00
Matthias Clasen
4fcf3b3a7d Merge branch 'gtk-3-24-focus-to-modal-parant-and-transient-for' into 'gtk-3-24'
Solution for focus loss problem for complex multi Window UI in Broadway backend

See merge request GNOME/gtk!3990
2023-02-10 11:37:49 +00:00
Matthias Clasen
1562ce4ebd Merge branch 'backport-mr-5489' into 'gtk-3-24'
Backport !5489 to gtk-3-24

See merge request GNOME/gtk!5490
2023-02-10 11:37:11 +00:00
Gaël Bonithon
857f734d83 searchengine: Emit a simple warning when tracker init failed
Failure is allowed by nature of GInitable, and this avoids unnecessary
crashing of programs running with G_DEBUG=fatal-criticals.

(cherry picked from commit 6215b38e64)
2023-02-09 23:21:04 +01:00
Gaël Bonithon
8497425535 searchengine: Add missing sanity check
(cherry picked from commit 41490f9624)
2023-02-09 23:20:47 +01:00
Piotr Drąg
3fd14b444a Update POTFILES.in 2023-02-04 16:14:22 +01:00
Matthias Clasen
dbdfac0310 Merge branch 'wip/carlosg/no-legacy-im-3-24' into 'gtk-3-24'
input: Drop legacy text input module

See merge request GNOME/gtk!5476
2023-02-04 12:37:03 +00:00
Carlos Garnacho
11c4cc235f input: Drop legacy text input module
This wayland protocol was merely some scaffolding until the
text_input protocol shaped up and took over. Nowadays this
could only ever help with really old versions of Mutter
(pre 3.28). This can be simply removed nowadays.
2023-02-04 10:17:50 +00:00
Matthias Clasen
5554113c74 Merge branch 'gtk-3-24' into 'gtk-3-24'
Fixes incorrect grabbing behaviour causing subsequent rejection of input

See merge request GNOME/gtk!5212
2023-01-28 17:46:05 +00:00
hrdl
15f0ac6f93 Remove warning 2023-01-28 14:20:49 +01:00
Matthias Clasen
37ea15e81f Merge branch 'revert-5aaa373b' into 'gtk-3-24'
Revert "Revert "wayland: Add support for gtk_surface1_titlebar_gesture()""

See merge request GNOME/gtk!5452
2023-01-28 12:59:27 +00:00
Alexander Mikhaylenko
384d9a75cd Revert "Revert "wayland: Add support for gtk_surface1_titlebar_gesture()""
This reverts commit 5aaa373b70
2023-01-28 09:41:34 +00:00
Matthias Clasen
b24e43a1f7 Merge branch 'revert-titlebar-gestures' into 'gtk-3-24'
Revert "wayland: Add support for gtk_surface1_titlebar_gesture()"

See merge request GNOME/gtk!5451
2023-01-28 03:03:51 +00:00
Matthias Clasen
5aaa373b70 Revert "wayland: Add support for gtk_surface1_titlebar_gesture()"
This reverts commit 45ba6e9329.

This caused regressions in libhandy-using applications.

Fixes: #5389
2023-01-27 21:34:44 -05:00
Carlos Garnacho
13647e0144 Merge branch 'fix-xdg-activation-set-surface-gtk-3-24' into 'gtk-3-24'
Backport "gdk/wayland: set requesting surface to xdg-activation" to gtk-3-24

See merge request GNOME/gtk!5398
2023-01-27 19:05:39 +00:00
Matthias Clasen
a23dfcd4c1 Merge branch 'gl-sync-gtk3' into 'gtk-3-24'
gl: Synchronize when calling MakeCurrent

See merge request GNOME/gtk!5448
2023-01-27 16:21:21 +00:00
Joan Bruguera
41827d9f72 gdk/wayland: set requesting surface to xdg-activation
The argument to xdg_activation_token_v1_set_surface is documented to be the
surface requesting the activation, not the surface to be activated, which is
given later when calling xdg_activation_v1_activate.
(c.f. 36cee4bdbc)

Use the same logic as in gdk_wayland_app_launch_context_get_startup_notify_id,
i.e. if we have a surface with focus, set that, otherwise set NULL.

This fixes requesting urgent/focus on wlroots (compositors like Sway, etc.),
which was blocked as the surface requesting the activation didn't have focus.

Backport of: 43c1a433aa

Signed-off-by: Joan Bruguera <joanbrugueram@gmail.com>
2023-01-27 14:53:41 +00:00
Matthias Clasen
9811485990 gl: Synchronize when calling MakeCurrent
When making out GL context current, wait
until the GPU is done with commands from
the previous context.

Fixes: #5517
2023-01-27 07:09:34 -05:00
Matthias Clasen
b6795f8ff9 Merge branch 'wip/carlosg/startup-vs-focus-3-24' into 'gtk-3-24'
Consider startup vs focus requests for the Wayland platform [3.24]

See merge request GNOME/gtk!5443
2023-01-25 13:09:17 +00:00
Carlos Garnacho
79e11bed1a gtkapplication: Do not call gdk_display_notify_startup_complete()
This should do nothing worthwhile anymore, the X11/Wayland GtkApplication
implementations do already pass the startup ID from the platform_data
via windowing specific APIs, and the application handling the request
via show()/present() should trigger the activation request.

(cherry-picked from commit 3526d8b299)
2023-01-25 11:22:40 +01:00
Carlos Garnacho
2a47038635 gtkwindow: Shuffle gdk_window_set_startup_id() calls
While this used to be tangential to windows showing or requesting
focus, the xdg-activation Wayland protocol does merge both concepts
together.

But also, for a correct interaction with the compositor, the
toolkit should ideally merge the activation request resulting from
both into the same one, so that the gdk_window_focus() request
replies to the startup token that started the application and
correct focus-stealing prevention/etc happens, instead making up
one just in time for the focus request.

This kind of requires doing things in the right order, a show()
request on the GtkWindow should activate any pending activation
token on the toplevel, a present() request should additionally
create a new token if there was none pending. And
xdg_activation_v1_activate() should happen once on both.

Shuffle the gdk_window_set_startup_id() calls so that this
happens in the right order for Wayland, while making X11 happy
too.

(cherry-picked from commit e8adfa2a88)
2023-01-25 11:22:40 +01:00
Carlos Garnacho
6ccd786a93 gdk/x11: Emit "remove" s-n message from gdk_toplevel_set_startup_id
In the way towards deprecating gdk_display_notify_startup_complete(),
make gdk_toplevel_set_startup_id() on X11 perform this piece of messaging
itself. It should be harmless that the message is emitted twice, if
callers do still use that API.

(cherry-picked from commit 7fab1b85ad)
2023-01-25 11:22:40 +01:00
Carlos Garnacho
f5a5480fe2 gdk/wayland: Perform xdg_activation on gdk_window_set_startup_id
This call has everything to perform activation as specified by the
xdg_activation protocol, notably a surface to activate as opposed to
gdk_notify_startup_complete().

Make activation happen here, so that the surface gets activated when
its gets a startup ID assigned.

(cherry-picked from commit 5aeabdb3d4)
2023-01-25 11:22:40 +01:00
Carlos Garnacho
a067938589 gtkwindow: Minor refactor
Move the handling of the startup ID to a separate function, since
this will be called from several places.

(cherry-picked from commit 6f01f846dc)
2023-01-25 11:22:40 +01:00
Matthias Clasen
1a17e71432 Merge branch 'fix-unscaled-fallback-icon' into 'gtk-3-24'
Take UI scale into acount when loading "image-missing" fallback

See merge request GNOME/gtk!5438
2023-01-22 00:01:07 +00:00
Brian J. Tarricone
89c7d5fe4b Take UI scale into acount when loading "image-missing" fallback
Fallback icons loaded were loading at half size (for a 2x scale) and for
cases where it mattered, were being positioned off-center.
2023-01-21 12:47:40 -08:00
Aurimas Černius
128cdaa113 Update Lithuanian translation 2023-01-19 21:09:54 +00:00
John Ralls
f60359c183 [quartz] GdkWindow, GdkNSView frame and cairo surface same size.
The cairo surface must be padded to 4 pixels in order to
transfer correctly to the GPU. The GdkWindow and GdkNSView's
content frame must be the same width, otherwise there's a mismatch
that causes either the GdkWindow to draw wider than the frame or the
frame to be clipped narrower than the title bar.

Fixes #5535.
2023-01-19 10:37:55 -08:00
Matteo Percivaldi
6a2fb84446 gtkcssanimatedstyle: Fix return of new_advance()
This was causing animation and transition to stop randomly and reset
their state to initial state.

This issue has existed since commit
7b68bdb831.

Closes #4426
2023-01-13 15:20:01 -05:00
Emin Tufan Çetin
7a9f88ee48 Update Turkish translation 2023-01-11 06:57:09 +00:00
Matthias Clasen
f2a8878570 Merge branch 'win-file-ext-3-24' into 'gtk-3-24'
Backport "filechoosernativewin32: Set default extension"

See merge request GNOME/gtk!5403
2023-01-08 12:57:00 +00:00
robxnano
c1aec7f100
filechoosernativewin32: Set default extension
Setting the default extension before a filter is selected allows
the IFileDialog to automatically change the extension when the
filter is changed. See:
https://learn.microsoft.com/en-us/windows/win32/api/shobjidl_core/nf-shobjidl_core-ifiledialog-setdefaultextension
2023-01-07 18:21:54 +00:00
John Ralls
10689066e3 [quartz] Fix typo to call function. 2023-01-06 10:13:02 -08:00
Nart Tlisha
a5198dd935 Update Abkhazian translation 2023-01-05 12:36:09 +00:00
Nart Tlisha
459f5537b3 Update Abkhazian translation 2023-01-05 12:24:58 +00:00
Emmanuele Bassi
f1471ea033 Merge branch 'fix-4913-for-gtk3' into 'gtk-3-24'
Treat XKB_MOD_NAME_LOGO as super key

See merge request GNOME/gtk!5387
2023-01-03 18:07:17 +00:00
Thomas Jost
0f55e9552f
Treat XKB_MOD_NAME_LOGO as super key
Loosely based on !5304, which fixes #4913 for GTK3.
2023-01-03 17:09:04 +01:00
Thomas Jost
7a41da3a6e
tests: make accel tests easier to debug 2023-01-03 16:58:18 +01:00
Matthias Clasen
8a76236f13 Merge branch 'gtk-3-24' into 'gtk-3-24'
build: Fix build_gir logic

See merge request GNOME/gtk!5371
2023-01-03 12:29:27 +00:00
Staudey
7e4a2a5724 Fix build_gir logic 2022-12-27 04:54:52 +00:00
Matthias Clasen
35516a5e86 3.24.36 2022-12-22 09:01:18 -05:00
Matthias Clasen
feb38ce112 Revert "Treat XKB_MOD_NAME_LOGO as super key"
This reverts commit 3a871c9184.

This broke one of our tests.
2022-12-22 09:00:37 -05:00
Matthias Clasen
6057e2141c Merge branch 'gtk-3-24-clipboard_eol' into 'gtk-3-24'
clipboard: improve EOL conversion of plain text

See merge request GNOME/gtk!5366
2022-12-22 13:31:26 +00:00
Ignazio Pillai
82e8605627 clipboard: improve EOL conversion of plain text
Handle the case of clipboard text with CR line endings
2022-12-22 10:26:34 +01:00
Matthias Clasen
6c70b5a43d Merge branch 'wip/gtk3-fix-delete-surrounding' into 'gtk-3-24'
[GTK3] gtkimcontextwayland: Convert byte based offset to char based offset in delete_surrounding_text

See merge request GNOME/gtk!5255
2022-12-20 02:19:39 +00:00
Alynx Zhou
9651546b97 gtkimcontextwayland: Convert byte based offset to char based offset in delete_surrounding_text
ClutterInputFocus/GtkIMContext uses char based offset for
delete_surrounding, however, text_input_v3 uses byte based offset for
it. Currently only GTK with mutter can work correctly via text_input_v3
because they both forget to convert between char based offset and byte
based offset.

This commit fixes it in GTK by converting byte based offset to char
based offset with the UTF-8 encoded surrounding text.

Fixes <https://gitlab.gnome.org/GNOME/gtk/-/issues/4566>.
2022-12-20 09:46:52 +08:00
Danial Behzadi
56b8cf501c Update Persian translation 2022-12-14 12:32:57 +00:00
Matthias Clasen
115588128f Merge branch 'revert-cursor-changes-3-24' into 'gtk-3-24'
Revert "wayland: Look for cursor themes in $HOME"

See merge request GNOME/gtk!5329
2022-12-14 11:04:08 +00:00