Commit Graph

72438 Commits

Author SHA1 Message Date
Carlos Garnacho
9822d2b6b2 wayland: Use xdg-activation for non-startup initiated focus requests
Currently, we have all the plumbing in place so that GTK consumes the
startup notification ID when focusing a window through the xdg-activation
protocol.

This however misses the case that a window might be requested to be
focused with no startup ID (i.e. via interaction with the application,
not through GApplication or other application launching logic).

In this case, we let the application create a token that will be
consumed by itself. The serial used is that from the last
interaction, so the compositor will still be able to do focus prevention
logic if it applies.

Since we already do have a last serial at hand, prefer xdg-activation
all the way over the now stale gtk-shell focusing support. The timestamp
argument becomes unused, but that is a weak argument to prefer the
private protocol over the standard one. The gtk-shell protocol support
is so far left for interaction with older Mutter.
2022-03-16 19:50:21 +01:00
Guido Günther
a36594e754 print-editor: Use gtk_window_present()
This lets xdg-activation work as otherwise gdk_wayland_surface_focus is
never invoked.
2022-03-16 19:50:21 +01:00
Guido Günther
c331e22f3a demo: Use gtk_window_present()
This lets xdg-activation work as otherwise gdk_wayland_surface_focus is
never invoked.
2022-03-16 19:50:21 +01:00
Guido Günther
d077f113b2 widget-factory: Use gtk_window_present()
This lets xdg-activation work as otherwise gdk_wayland_surface_focus is
never invoked.
2022-03-16 19:50:21 +01:00
Guido Günther
1ab89b3908 wayland: Keep startup_notification_id around long enough
When using xdg_activation we need to keep the id around until we send
the first activate to signal succesful startup.
2022-03-16 19:50:21 +01:00
Guido Günther
c5da579cda window: Make sure we call gdk_wayland_surface_focus
When using xdg_activation this is responsible for submitting
the activation token / startup id to the compositor.
2022-03-16 19:50:21 +01:00
Matthias Clasen
38bbcb7411 gtk-builder-tool: Operate without display
The simplify and validate commands can function
without a display connection, only preview absolutely
needs one. Allow this, by using gtk_init_check().
2022-03-15 22:08:01 -04:00
Matthias Clasen
3223f3e3b8 build: Avoid objcopy on arm
The trickery we do with objcopy and ld to speed up
resource inclusion does not seem to work right on
32bit Arm, so just skip it there.

Fixes: #4757, #4748, #4752
2022-03-15 22:07:52 -04:00
Matthias Clasen
ba885e2ace Apply 1 suggestion(s) to 1 file(s) 2022-03-15 22:07:35 -04:00
Fina Wilke
9cc051ffa5 gtkplacessidebar: Prevent calling g_object_unref on null
g_object_unref would be called on a null end_icon when provider_account_status
is CLOUD_PROVIDERS_ACCOUNT_STATUS_IDLE
2022-03-15 22:07:20 -04:00
Ting-Wei Lan
e8dd40ccca build: Don't use ld and objcopy when cross-compiling
These commands don't work when compiling Windows binaries on Linux.
2022-03-15 22:06:30 -04:00
Caolán McNamara
53263d3d27 fix docs for gtk_accessible_update_relation example 2022-03-15 22:06:04 -04:00
Sebastien Bacher
71c935d1f4 Use the correct name for installed gdk tests 2022-03-15 22:05:31 -04:00
Matthias Clasen
5e07e216d3 Fix a documentation typo
It is XDG_DATA_HOME.

Fixes: #4747
2022-03-15 22:05:22 -04:00
Matthias Clasen
88894b705b Fix up preconditions of gsk_gl_shader_node_new
These were not quite right, and implied that args
may be NULL, when it really can't.

Fixes: #4739
2022-03-15 22:05:14 -04:00
Emmanuel Gil Peyrot
b8d01bf041 gdk: Add a rgb8 → rgba8 conversion macro
This one can be used for both premultiplied and non-premultiplied alpha
formats, since alpha is always 255.  It is useful for opaque PNG upload
on both cairo and GL renderers.
2022-03-15 22:05:00 -04:00
Emmanuel Gil Peyrot
c636ea036a gdk: Make the optimized premultiply function a macro
That way, all permutations are possible.  Previously it was only useful
in the cairo renderer, which required rgba8 → premultiplied bgra8, while
the GL renderer required rgba8 → premultiplied rgba8.  Now both are
available.
2022-03-15 22:04:52 -04:00
Emmanuel Gil Peyrot
08099ed17d gdk: Remove pixel format conversion ARM intrinsics
This was only useful when building for AArch32 without -mfpu=neon, on
AArch64 or with -mfpu=neon gcc is smart enough to do the auto-
vectorisation, leading to code almost as good as what I wrote in
1fdf5b7cf8.
2022-03-15 22:04:44 -04:00
Christian Hergert
f0e8ee3c29 gdk: use EGL_KHR_swap_buffers_with_damage
It appears that NVIDIA does not implement EGL_EXT_swap_buffers_with_damage
on their EGL implementation, but does implement the KHR variant of it.
This checks for a suitable implementation and stores a pointer to the
compatible implementation within the GdkGLContextPrivate struct.
2022-03-15 22:04:30 -04:00
Bilal Elmoussaoui
33a1cf203e headerbar: Fix docs 2022-03-15 22:04:23 -04:00
Matthias Clasen
5adce748cb text: Stop blinking when we lose focus
We were looking at GtkWidget:has-focus from
event controller signal handlers here, but
the widget property is only changed after
the event controllers.
2022-03-15 22:03:50 -04:00
Matthias Clasen
21d39b6054 focus controller: Update for active window
When the window gains or looses active status,
update the focus controllers status.
2022-03-15 22:03:42 -04:00
Matthias Clasen
a2f30ac1ab window: Update has-focus property
Update the :has-focus property of the focus
widget when the active status of the window
changes.

We change the property after generating the
GDK_CROSSING_ACTIVE crossing events.
2022-03-15 22:03:34 -04:00
Carlos Garnacho
3764b27bab gtkscrolledwindow: Do not try to doubly trigger deceleration
This may come from different sources at around the same time, e.g.
a hold gesture while on overshoot. Avoid doing that if an
animation is already set.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/4730
2022-03-15 22:02:45 -04:00
Rico Tzschichholz
8fb610915c gdk: Add missing out annotation on gdk_content_deserialize_finish 2022-03-15 22:01:19 -04:00
Benjamin Otte
16a7e3e3d8 listview: Fix return_if_fail()s 2022-03-15 22:00:58 -04:00
Benjamin Otte
47ea51efab flattenlistmodel: Fix indentation 2022-03-15 22:00:47 -04:00
Benjamin Otte
50554bb92b renderers: Handle large viewports
When large viewports are passed to gsk_renderer_render_texture(), don't
fail (or even return NULL).

Instead, draw multiple tiles and assemble them into a memory texture.

Tests added to the testsuite for this.
2022-03-15 22:00:39 -04:00
Christoph Reiter
0ea0fc9c7b CI: disable debug for MSVC
CI currently fails with "fatal error LNK1318: Unexpected PDB error; OK (0) ''"
Google tells me it might be related to hitting a memory limit. Let's try
disabling debug for now.
2022-03-15 22:00:30 -04:00
Luca Bacci
206e837dde Fix last error reporting when calling GetClipboardOwner
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/1402
2022-03-15 22:00:10 -04:00
Matej Urbančič
f43d0365dd Update Slovenian translation 2022-03-15 21:27:06 +00:00
Kjartan Maraas
72a557087c Update Norwegian Bokmål translation 2022-03-15 15:26:33 +00:00
Мирослав Николић
b59f9b97f3 Update Serbian translation 2022-03-15 06:33:22 +00:00
Christian Kirbach
a1f4735652 Update German translation 2022-03-13 22:08:50 +00:00
Balázs Úr
c5e372490d Update Hungarian translation 2022-03-13 00:25:05 +00:00
Baurzhan Muftakhidinov
78e083b014 Update Kazakh translation 2022-03-12 16:34:02 +00:00
Baurzhan Muftakhidinov
6ac723321f Update Kazakh translation 2022-03-12 13:23:19 +00:00
Anders Jonsson
343b08f3e6 Update Swedish translation 2022-03-12 11:39:05 +00:00
Dušan Kazik
c8d1f23ff5 Update Slovak translation 2022-03-11 07:43:53 +00:00
Balázs Úr
8a7fd71697 Update Hungarian translation 2022-03-11 01:08:54 +00:00
Yosef Or Boczko
39fcfa4473 Update Hebrew translation 2022-03-10 18:42:34 +00:00
Jiri Grönroos
d188c6dbaf Update Finnish translation 2022-03-09 19:03:37 +00:00
Marek Černocký
8aec0dc200 Fixed Czech translation 2022-03-09 19:07:33 +01:00
Anders Jonsson
9053fd8335 Update Swedish translation 2022-03-09 10:49:50 +00:00
Danial Behzadi
a9720259f0 Update Persian translation 2022-03-08 15:00:39 +00:00
Ask Hjorth Larsen
b012886294 Updated Danish translation of gtk-properties 2022-03-08 01:21:58 +01:00
Ask Hjorth Larsen
5de26c684b Updated Danish translation 2022-03-08 01:21:58 +01:00
Aurimas Černius
b1d9259e7d Updated Lithuanian translation 2022-03-07 18:29:36 +02:00
Luna Jernberg
89bba41fd7 Update Swedish translation 2022-03-07 08:09:32 +00:00
Luming Zh
248d7ec93c Update Chinese (China) translation 2022-03-05 23:45:12 +00:00