Commit Graph

51588 Commits

Author SHA1 Message Date
William Wold
5a52af20cb Do not require an initial configure for DnD windows
Fixes #2075
2020-04-05 07:11:45 -04:00
William Wold
12fc9a45ef Do not require an initial configure for custom Wayland surfaces
There is no way for custom Wayland surfaces to get configure events, so an
initial configure event should not be required to resize a custom surface.

Fixes #2578.
2020-04-05 05:28:55 -04:00
Ibai Oihanguren Sala
8c97702a07 Update Basque translation 2020-04-04 13:44:01 +00:00
Matthias Clasen
5a0891c69d Merge branch 'gtk-3-24' into 'gtk-3-24'
docs: Do not call GTK APIs if gtk_init_check returns FALSE

See merge request GNOME/gtk!1617
2020-04-04 03:18:01 +00:00
Nicola Fontana
392d4de8a9 docs: Do not call GTK APIs if gtk_init_check returns FALSE
See issue #994.
2020-04-03 22:59:59 +02:00
Rūdolfs Mazurs
4ce11106c8 Update Latvian translation 2020-04-03 20:47:38 +00:00
Matthias Clasen
4480c0ffc6 3.24.17 2020-04-03 13:07:53 -04:00
Matthias Clasen
da1686eb47 Fix build issues with HighContrast theme 2020-04-03 12:54:32 -04:00
Matthias Clasen
eecd33146e Merge branch 'wip/dont-postpone-subsurface-resize' into 'gtk-3-24'
wayland: Don't postpone resizes for subsurfaces

See merge request GNOME/gtk!1620
2020-04-03 16:43:19 +00:00
Jonas Ådahl
749d940887 wayland: Don't postpone resizes for subsurfaces
Subsurfaces won't ever receive a configure event.

Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/2570
2020-04-03 18:04:44 +02:00
Matthias Clasen
c67d0f0d1d Merge branch 'wip/carlosg/fix-surrounding-text-again' into 'gtk-3-24'
imwayland: Clamp the surrounding string end correctly

See merge request GNOME/gtk!1619
2020-04-03 15:39:30 +00:00
Matthias Clasen
0fbc3581bc Merge branch '3.24-meson-bump' into 'gtk-3-24'
meson: Bump to latest version of the 3.24 branch

See merge request GNOME/gtk!1613
2020-04-03 12:25:32 +00:00
Carlos Garnacho
d7fb15c822 imwayland: Clamp the surrounding string end correctly
In the paths where len > MAX_LEN and cursor/anchor are separated by
at least MAX_LEN from text edges, we were clamping the right end of
the surrounding string at MAX_LEN. Oops.

This end anchor may go as far as the string length, although just
up to len - MAX_LEN in real terms (due to the condition above that
caches cursor/anchor positions being near enough the text end).

Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/2565
2020-04-03 12:57:44 +02:00
Philippe Normand
c010a95d8c meson: Bump to latest version of the 3.24 branch
3.24.16 was tagged without bumping the version in the Meson build definitions.
2020-04-03 10:52:29 +01:00
Matthias Clasen
d5264673cb wayland: Load .Compose in imwayland too
GtkIMContextSimple loads custom compose sequences
in its set_client_window implmentation, so we need
to chain up in order to not lose those.
2020-04-02 17:30:54 -04:00
Matthias Clasen
94a2827ed9 Merge branch 'keyboard-focus' into 'gtk-3-24'
gdk/wayland: Clear modifiers when we lose keyboard focus

See merge request GNOME/gtk!1609
2020-04-02 19:23:36 +00:00
Jan Alexander Steffens (heftig)
c27cb675b7
gdk/wayland: Clear modifiers when we lose keyboard focus
When we `Alt+Tab` away from a GTK application, it loses keyboard focus.
If we don't clear the modifiers, events from other devices that we
receive while unfocused will assume `Alt` is still pressed. This results
in e.g. Firefox navigating through the history instead of scrolling the
page when using the mouse wheel on it.

We don't get any information about modifiers while we are missing
keyboard focus, so assuming no modifiers are active is the best we can
do.

The shell sends us a modifier update immediately before we regain
keyboard focus, so the state shouldn't get out of sync.

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2112
2020-04-02 20:45:55 +02:00
Matthias Clasen
263467ca3d Merge branch 'wip/window-state-change-fixes' into 'gtk-3-24'
Some Wayland window state change resize fixes

See merge request GNOME/gtk!1606
2020-04-02 17:25:31 +00:00
Jonas Ådahl
3b91c20eac wayland: Add margin to saved size when restoring size
We're normally going from a fixed size to a floating state when we're
using the saved size, meaning we're practically always going towards a
state where the shadow margin will non-empty. However, if we don't
include any margin when creating a new configure request, we'll end up
resizing to a slightly smaller size as gtk will cut off the margin from
the configure request when changing the window widget size.

This wasn't visible when e.g. going from maximized to floating, as we'd
add the shadow margin at a later point, which would effectively "grow"
the widnow size, but when we're going from tiled to floating, we both
start and end with a non-empty shadow margin, meaning we'd shrink ever
so slightly every time going between tiled and floating.
2020-04-02 18:10:03 +02:00
Jonas Ådahl
50aa947e51 wayland: Treat being tiled as maximized when saving size
We should never save a size when we're tiled, just as we shouldn't when
we're maximized. This fixes returning to the correct floating size after
having been tiled or maximized.
2020-04-02 18:10:03 +02:00
Jonas Ådahl
04b7853a38 wayland: Respect fixed size when resizing
If a window is configured with a fixed size (it's tiled, maximized, or
fullscreen), ignore any resize call that doesn't respect this. The set
size will instead be saved, when appropriate, so that the new size is
used when e.g. unmaximizing.

This makes it possible to call 'gtk_window_resize()' while the window is
maximized, without the window actually changing size until it's
unmaximized. Changing size to a non-maximized size is a violation of the
xdg-shell protocol.
2020-04-02 18:10:03 +02:00
Jonas Ådahl
7f12dc2b66 wayland: Postpone window resize requests until configured
An application may want to set a fallback size of a window while still
mapping maximized. This is done by calling gtk_window_resize() before
gtk_window_maximize() and before gtk_window_show(). When the window is
mapped, it should have a maximized size, and if it eventually is
unmaximized, it should fall back to the size from the earlier
gtk_window_resize() call.

What happens before this commit is that the initial window size ends up
respecting the first gtk_window_resize() dimensions, and not the window
dimension configured by the Wayland display server (i.e. maximized
dimensions).

Fix this by postponing any configure events until we received our
configuration from the display server. If we got one with a fixed size
(e.g. we're maximized, tiled etc), we use that, otherwise we look at the
one that was previously configured by gtk which corresponds to the
"preferred" size when not being maximized.

This fixes Firefox being started in a maximized state when using the
Wayland backend.

Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/2538
2020-04-02 18:09:56 +02:00
Matthias Clasen
f5b393fef0 Merge branch 'wip/smcv/libdir-independent-valgrind-suppressions-gtk3' into 'gtk-3-24'
[3.x] supp: Use a single suppressions file for lib, lib64 and multiarch

See merge request GNOME/gtk!1604
2020-04-02 14:47:16 +00:00
Simon McVittie
8afd623989 supp: Use a single suppressions file for lib, lib64 and multiarch
In addition to the traditional library directory lib and the 64-bit
multilib directory lib64, this will cover Debian-style multiarch
(lib/x86_64-linux-gnu etc.), Arch Linux 32-bit (lib32), x32 and
various others.

Signed-off-by: Simon McVittie <smcv@debian.org>
2020-04-02 09:30:44 +01:00
Jiri Grönroos
b62860b1b8 Update Finnish translation 2020-04-01 14:51:22 +00:00
Matthias Clasen
58cfd44307 Merge branch 'BUG_filechooser_new_folder_focus_GTK3' into 'gtk-3-24'
gtkfilechooserwidget: set 'New folder' button focus-on-click

See merge request GNOME/gtk!1595
2020-04-01 04:28:22 +00:00
Matthias Clasen
d8ab9c4259 Merge branch 'BUG_buttons_with_menu_onclick_GTK3' into 'gtk-3-24'
GtkMenuButton: disable focus-on-click

See merge request GNOME/gtk!1596
2020-04-01 02:56:51 +00:00
Nelson Benítez León
527a99e598 GtkMenuButton: disable focus-on-click
As general rule, all buttons that launch a menu should
not grab focus on click, because otherwise when the menu
is closed the focus goes back to the button instead of
the previously focused widget, which is the one the user
was interacting with.

GtkScaleButton and GtkVolumeButton set focus-on-click
to FALSE for this same reason.

Fixes #2557
2020-03-31 21:00:32 -04:00
Nelson Benítez León
3997cdf2f4 gtkfilechooserwidget: set 'New folder' button focus-on-click
As general rule, all buttons that launch a menu should
not grab focus on click, because otherwise when the menu
is closed the focus goes back to the button instead of
the previously focused widget, which is the one the user
was interacting with.

So this is also the case for the 'New Folder' button on
the filechooser.

Fixes #2557
2020-03-31 20:15:34 -04:00
John Ralls
56eeda6c7c Merge branch MR1570 into gtk-3-24. 2020-03-31 15:46:26 -07:00
Matthias Clasen
21e0e3f863 Merge branch 'wip/jimmac/HC-redesign-gtk3' into 'gtk-3-24'
HC: derive from Adwaita

See merge request GNOME/gtk!1587
2020-03-30 17:48:22 +00:00
Emmanuele Bassi
9fdc64f7fc Merge branch 'wip/hadess/no-gauto-portal' into 'gtk-3-24'
Remove g_auto usage

See merge request GNOME/gtk!1588
2020-03-30 16:22:58 +00:00
Bastien Nocera
8dfb1d197a gtkprivate: Remove g_auto usage
Fixes: 93ab478af1
2020-03-30 17:50:50 +02:00
Bastien Nocera
fa16b682ef colorpickerportal: Remove g_auto usage
Fixes: 7b1b3fa0cb
2020-03-30 17:50:09 +02:00
Jakub Steiner
98148d9d60 HC: derive from Adwaita
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/1450
2020-03-30 16:49:44 +02:00
Yosef Or Boczko
afe4f283ed Update Hebrew translation 2020-03-29 15:28:00 +00:00
Yosef Or Boczko
2b0155dbc4 Update Hebrew translation 2020-03-29 15:22:36 +00:00
Matthias Clasen
7624f07764 3.24.16 2020-03-27 16:51:18 -04:00
Matthias Clasen
a923ee9b87 Don't forget to dist gtktexttagprivate.h 2020-03-27 16:50:15 -04:00
Matthias Clasen
dca7dc8c9c 3.24.15 2020-03-27 15:01:23 -04:00
Mantas Kriaučiūnas
c62da2bdaa Update Lithuanian translation 2020-03-27 18:53:21 +00:00
Matthias Clasen
5e7650729b Merge branch 'wip/hadess/portal-select-folders' into 'gtk-3-24'
filechoosernativeportal: Allowing selecting folder(s)

See merge request GNOME/gtk!1523
2020-03-27 18:34:02 +00:00
Matthias Clasen
c716776b8f Merge branch 'wip/jimmac/plug-holes-gtk3' into 'gtk-3-24'
Adwaita: work around holes in unfocused windows

See merge request GNOME/gtk!1574
2020-03-26 18:59:12 +00:00
Jakub Steiner
f4c705b404 Adwaita: work around holes in unfocused windows
- works around holes in rounded corners of backdrop windows

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2537
2020-03-26 19:09:57 +01:00
LecrisUT
788fef5e80 Monitor_added signal after configure
Fixed order of monitor_added signal for Quartz display.
2020-03-26 13:06:45 +09:00
Matthias Clasen
6f372a811b Merge branch 'translate-geometry' into 'gtk-3-24'
Translate geometry with offscreen windows

See merge request GNOME/gtk!1566
2020-03-26 01:44:37 +00:00
Alberto Fanjul
842599e0f9 gdk/wayland: Control translate from parent geometry
offscreen windows return NULL for its parent
2020-03-25 23:23:23 +01:00
Matthias Clasen
58eb628571 wayland: Support scales up to 400% for cursors
Suggested in https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/1503
2020-03-25 11:21:50 -04:00
Bastien Nocera
35fec1c6b2 filechoosernativeportal: Allowing selecting folder(s)
Use the "directory" portal option when asked to select folders.
2020-03-23 15:41:10 +01:00
Bastien Nocera
93ab478af1 Add portal version checking helper
Add gtk_get_portal_interface_version() to check the version of a portal.
2020-03-23 15:05:40 +01:00