Commit Graph

52862 Commits

Author SHA1 Message Date
Kjartan Maraas
d3c39fb438 Update Norwegian Bokmål translation 2022-11-04 07:49:02 +00:00
Kukuh Syafaat
56eaeff89d Update Indonesian translation 2022-11-03 03:47:01 +00:00
Nathan Follens
230718c326 Update Dutch translation 2022-11-01 23:08:40 +00:00
Aleksandr Melman
d0f49d9f9d Update Russian translation 2022-10-31 12:28:26 +00:00
Nart Tlisha
13cdfb7476 Update Abkhazian translation 2022-10-31 09:48:33 +00:00
Piotr Drąg
e6ce24125c Update Polish translation 2022-10-30 12:37:05 +01:00
Balázs Úr
ae42ed0a18 Update Hungarian translation 2022-10-30 00:00:03 +00:00
Hugo Carvalho
2d76cd4b2b Update Portuguese translation 2022-10-29 15:46:12 +00:00
Yuri Chornoivan
bd736aed8c Update Ukrainian translation 2022-10-29 05:46:25 +00:00
Martin
89ea9ba600 Update Slovenian translation 2022-10-28 06:33:43 +00:00
Matthias Clasen
b009366e21 Merge branch 'keypad-accels' into 'gtk-3-24'
Differentiate keypad keysyms in accelerators

See merge request GNOME/gtk!5176
2022-10-28 04:02:48 +00:00
Matthias Clasen
6cc0552ab8 Differentiate keypad keysyms in accelerators
When displaying accelerators, differentiate keypad
symbols with a 'KP' prefix. Fixing a 17 year old bug.

Backport of c58d9446f40b36136f25baf.
2022-10-27 14:57:01 -04:00
Matthias Clasen
2703e420ae Merge branch 'wip/carlosg/xdg-activation-3-24' into 'gtk-3-24'
gdk/wayland: Support the xdg-activation wayland protocol (3.24)

See merge request GNOME/gtk!3489
2022-10-26 22:15:11 +00:00
Jonas Ådahl
0b4b9f6136 Merge branch 'tooltips-x11-scale-cursor-size' into 'gtk-3-24'
GtkTooltip: Scale the cursor size on X11

See merge request GNOME/gtk!5173
2022-10-26 15:41:23 +00:00
Luca Bacci
bbce00f3a3 GtkTooltip: Scale the cursor size on X11
GtkSettings/X11 takes the values as provided by
XSettings. Unlike other backends, the values of
XSettings are in physical size (that's because
X11 doesn't support mixed-DPI setups anyway).

Take that in account when retrieving the cursor
size in gtk_tooltip_position ().

Note that this discrepancy between the X11 and
other backends has been fixed in GTK4.

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/5223
2022-10-26 15:21:38 +02:00
Joan Bruguera
22c95cd1e9 gdk/wayland: Enable xdg-activation only if wayland-protocols >= 1.21
This way we can keep the same wayland-protocols requirement, so the latest GTK3
still builds on distributions shipping older versions of wayland-protocols,
such as Debian Bullseye.

Should fix CI builds as well.
2022-10-25 23:52:47 +02:00
Carlos Garnacho
3b25f9a662 gdk/wayland: Check the GdkSurface wl_surface before using it for activation
Double check the GdkSurface has a wl_surface before using it as the activation
token source, since we cannot use NULL surfaces here.

Fixes: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1862
Backport-of: 4b41d4f78ce71b60f0d51837cd1b6a1b346d679d
Signed-off-by: Joan Bruguera <joanbrugueram@gmail.com>
2022-10-25 15:54:05 +02:00
Carlos Garnacho
7fa87abf8a gdk/wayland: Dispatch GdkAppLaunchContext activation token in its own queue
Use a separate queue to dispatch the token object exclusively, just like we
do on the GdkSurface activation paths.

Backport-of: fb68600d88d4d334f7da7d079b106a1ef14503a6
Signed-off-by: Joan Bruguera <joanbrugueram@gmail.com>
2022-10-25 15:53:57 +02:00
Carlos Garnacho
45f0b5d052 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.

Backport-of: 4dcacff3120d5c1cef888061dbc42f5fbe093a58
Signed-off-by: Joan Bruguera <joanbrugueram@gmail.com>
2022-10-25 15:53:49 +02:00
Guido Günther
e80251e751 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.

Backport-of: 999509be619bfa0f50a549489b5ab5c890b574fa
Signed-off-by: Joan Bruguera <joanbrugueram@gmail.com>
2022-10-25 15:53:36 +02:00
Guido Günther
54348c5270 wayland: xdg-activation: Don't assume there's a focus surface
Tools like gtk4-launch can't set surface on the activation token so
don't require it. If the compositor requires it we can't do anything
about it anyway. This avoids a critical:

   (gtk4-launch:23497): Gdk-CRITICAL **: 17:07:24.704: gdk_wayland_surface_get_wl_surface: assertion 'GDK_IS_WAYLAND_SURFACE (surface)' failed

Fixes: be4216e051 ("gdk/wayland: Support the xdg-activation wayland protocol")

Signed-off-by: Guido Günther <agx@sigxcpu.org>
Backport-of: 4d741bac98f906796d61eebfb4f74f5b1cecb2b6
Signed-off-by: Joan Bruguera <joanbrugueram@gmail.com>
2022-10-25 15:53:26 +02:00
Carlos Garnacho
a79d6972e0 gdk/wayland: Support the xdg-activation wayland protocol
This protocol implements the IPC necessary to focus application
windows across launcher/launchee. Add support for it.
2022-10-25 15:50:02 +02:00
Matthias Clasen
84a3ea5ec4 Merge branch 'gtk-cursor-wayland-hotspot' into 'gtk-3-24'
[gtk3] [wayland] Fix hotspot positioning with scaled surface.

See merge request GNOME/gtk!5159
2022-10-21 17:29:31 +00:00
Emilio Cobos Álvarez
686864a118
[gtk3] [wayland] Fix hotspot positioning with scaled surface.
Fixes !5278 to behave the same way as X11.
2022-10-21 14:22:51 +02:00
Alexander Shopov
95cb7d04c7 Update Bulgarian translation 2022-10-07 09:08:40 +00:00
Carlos Garnacho
108343b037 Merge branch 'wl-ime-lockscreen-fixes' into 'gtk-3-24'
gtk3: Backport of !4962. !5050, !5012: gtkimcontextwayland: Refactor handling of client updates

See merge request GNOME/gtk!5091
2022-10-06 10:57:35 +00:00
Carlos Garnacho
92813e52cd gtkimcontextwayland: Shuffle full resets after IM changes
Doing reset() on the text widgets after commit and delete_surrounding
is still too eager for some IMs (e.g. those that expect being able
to commit text while keeping a preedit buffer shown).

However, reset() is more of a "synchronize state" action on Wayland,
and it is still desirable to do that after changes that do come from
the IM (e.g. requesting the new surrounding text and cursor/anchor
positions). Notably here, the text_input protocol may still come up
with a preedit string after this state synchronization happens.

Shuffle the code so that the text widgets do not reset() the IM
context after text is deleted or committed, but the Wayland IM does
apply its practical effects after these actions happen. This keeps
the Wayland IM fully up-to-date wrt text widget state, while not
altering the ::commit and ::delete-surrounding-text behavior for
other IM context implementations.
2022-10-06 17:40:38 +07:00
Carlos Garnacho
a88e848306 gtktextview: Also reset IM context after IM surrounding text deletion
When the IM commands the GtkText to delete text, the cursor position
would change, and so would the surrounding text. Reset the IM context
so that these updates are properly picked up by the IM.

Fixes backspace	key behavior in	the GNOME Shell OSK, since that	relies
on the surrounding text	being properly updated for the next iteration.
2022-10-06 17:29:50 +07:00
Carlos Garnacho
018083fab7 gtkentry: Also reset IM context after IM surrounding text deletion
When the IM commands the GtkText to delete text, the cursor position
would change, and so would the surrounding text. Reset the IM context
so that these updates are properly picked up by the IM.

Fixes backspace key behavior in the GNOME Shell OSK, since that relies
on the surrounding text being properly updated for the next iteration.
2022-10-06 17:29:50 +07:00
Carlos Garnacho
fa6aca2925 gtkentry: Avoid early IM reset on updates
Resetting the IM on IM updates is too eager and indeed the simple
IM context doesn't like that this happens in the middle of dead
key handling.

We however want to reset the IM after actual text buffer changes
(say, a committed string) moved the cursor position, altered the
surrounding text, etc. So that the IM implementation does know to
update its state.

Since there is going to be an actual IM reset anyways, it does
no longer make sense to try to preserve the old priv->need_im_reset
status during commit handling.
2022-10-06 17:29:50 +07:00
Carlos Garnacho
7b1f9a3b08 gtkentry: Avoid early IM reset on updates
Resetting the IM on IM updates is too eager and indeed the simple
IM context doesn't like that this happens in the middle of dead
key handling.

We however want to reset the IM after actual text buffer changes
(say, a committed string) moved the cursor position, altered the
surrounding text, etc. So that the IM implementation does know to
update its state.
2022-10-06 17:29:36 +07:00
Carlos Garnacho
b0c4196f98 gtkentry: Shuffle the places doing IM reset
During entry widget manipulation (inserting or deleting text via keyboard)
the IM context is reset somewhat early, before the actual change took place.
This makes IM lag behind in terms of surrounding text and cursor position.

Shuffle these IM reset calls so that they happen after the changes, and
ensure that the IM is actually reset, since that is currently toggled on
a pretty narrow set of circumstances.
2022-10-06 17:28:25 +07:00
Carlos Garnacho
0a8b0025e3 gtktextview: Shuffle the places doing IM reset
During text widget manipulation (inserting or deleting text via keyboard)
the IM context is reset somewhat early, before the actual change took place.
This makes IM lag behind in terms of surrounding text and cursor position.

Shuffle these IM reset calls so that they happen after the changes, and
ensure that the IM is actually reset, since that is currently toggled on
a pretty narrow set of circumstances.

Also, fix a bug during GtkEventControllerKey::im-update where the condition
on cursor position editability to reset the IM context was inverted.
2022-10-06 17:16:39 +07:00
Carlos Garnacho
a2f579eca8 gtkimcontextwayland: Refactor handling of client updates
Currently, the wayland IM context sends zwp_text_input_v3.commit from
a number of places, and some of them with partial data. In order to
make client state updates "atomic" and complete, make the communication
happen over an unified notify_im_change() function that happens on
a narrower set of circumstances:

  - The GtkIMContext is reset
  - The GtkIMContext is just focused
  - The gesture to invoke the OSK is triggered
  - The IM context is reacting to changes coming from the compositor

Notably, setting the cursor location or the surrounding text do not try
to commit state on their own, and now will be flushed with the corresponding
IM update or reset. But also, these requests won't be prevented from
happening individually on serial mismatch, instead it will be the whole
state commit which is held off.

With these changes in place, all client-side updates are notified
atomically to the compositor under a single .commit request.
2022-10-06 17:16:33 +07:00
Matthias Clasen
293cee1724 Merge branch 'wip/carlosg/flush-uncompressed-motion' into 'gtk-3-24'
gdk: Ensure GdkFrameClock::flush-events with uncompressed motion

See merge request GNOME/gtk!5075
2022-10-03 20:48:10 +00:00
Carlos Garnacho
5ea961ed93 gdk: Ensure GdkFrameClock::flush-events with uncompressed motion
Sometimes, there may be motion events left in the queue, because at the
time of handlign these motion events the GDK_FRAME_CLOCK_PHASE_FLUSH_EVENTS
phase is not requested.

Ensure that, when finding motion events on a window that does not disable
motion compression, the events are anyways flushed, so they can be processed
early by the window/widget event handlers.

Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/4946
2022-10-03 16:42:40 +02:00
Emmanuele Bassi
1ad49f238c Merge branch 'wip/carlosg/translate-string-selections' into 'gtk-3-24'
wayland: Translate STRING/UTF8_STRING selection atoms to mimetypes

See merge request GNOME/gtk!5072
2022-10-03 09:06:51 +00:00
Fabio Tomat
725ae0c878 Update Friulian translation 2022-10-03 08:39:31 +00:00
Carlos Garnacho
0c1ea92219 wayland: Translate STRING/UTF8_STRING selection atoms to mimetypes
Since the GDK API layer in 3.x is considerably tied to X11 details,
it makes sense to provide this bit of translation in case the app
uses these exclusively and does not use actual mimetype strings.
Provide this bit of translation of X11 selection atoms to mimetypes.

While at it, use the right zwp_primary_selection_source_v1 API with
primary selection data sources. From the looks of it, this just
happened to work.

Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/5217
2022-10-03 10:35:48 +02:00
Goran Vidović
67432fe3bc Update Croatian translation 2022-10-02 14:37:54 +00:00
Zurab Kargareteli
0bd5cfb1ce Update Georgian translation 2022-10-02 10:38:04 +00:00
Matthias Clasen
80d8970072 Merge branch 'wip/titlebar-gesture-gtk3' into 'gtk-3-24'
[3-24] wayland: Add support for gtk_surface1_titlebar_gesture()

See merge request GNOME/gtk!5070
2022-10-01 01:34:33 +00:00
Jonas Ådahl
45ba6e9329 wayland: Add support for gtk_surface1_titlebar_gesture()
This adds a private GDK API that GTK calls using GDK_PRIVATE_CALL(). It
is more or less a copy of the GdkSurface::titlebar_gesture() API, and
achieves the same. If the backend or compositor doesn't support titlebar
gestures, the existing path is used as a fallback.
2022-09-30 22:38:03 +02:00
Nart Tlisha
1a745a6b35 Update Abkhazian translation 2022-09-29 15:16:17 +00:00
Goran Vidović
4c77925af6 Update Croatian translation 2022-09-29 12:16:17 +00:00
Goran Vidović
d388d65eb7 Update Croatian translation 2022-09-29 12:14:26 +00:00
Luca Bacci
812b3930d0 Merge branch 'gdk-win32-fix-subclassing-gdk-win32-selection' into 'gtk-3-24'
GdkWin32: Fix subclassing for GdkWin32Selection

See merge request GNOME/gtk!5054
2022-09-26 12:52:32 +00:00
Luca Bacci
8f0d580cf9 GdkWin32: Fix subclassing for GdkWin32Selection 2022-09-26 14:28:03 +02:00
Carlos Garnacho
56100ab49a Merge branch 'work/zzag/kde-dnd' into 'gtk-3-24'
gdk/wayland: Update selection's offer before updating dnd targets

See merge request GNOME/gtk!5045
2022-09-23 09:09:22 +00:00
Vlad Zahorodnii
965aa2e65f gdk/wayland: Update selection's offer before updating dnd targets
gdk_wayland_drop_context_update_targets gets targets from the
selection's offer. In order to ensure that the drop context has
up-to-date targets, update the selection's offer before updating
targets.

This fixes drag-and-drop not working reliably when running Firefox in
Plasma Wayland session.
2022-09-23 11:12:41 +03:00