Commit Graph

51773 Commits

Author SHA1 Message Date
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
Thomas Holder
e278f38905 macOS: fix #2436 raise transient window on focus 2020-04-02 17:57:18 +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
Nelson Benítez León
6d98edf89f filechooser: set default widget early for 'Rename' popover
because otherwise this second[1] popover will not be
able to save the filechooser default widget (the 'save'
button) because the first popover has not yet restablish
it (as will be done on popover's unmap handler).

[1] second because 'Rename' popover is launched from inside
    the 'file properties' popover.

Fixes #2555
2020-03-31 14:32:03 -04: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
Bastien Nocera
f70f2d7cae colorpickerportal: Don't throw warnings on missing version
If the version can't be fetched, don't throw a warning.
2020-03-23 14:59:51 +01:00
Bastien Nocera
4c71bf74f1 colorpickerportal: Simplify portal version fetching 2020-03-23 14:59:51 +01:00
Bastien Nocera
7b1b3fa0cb colorpickerportal: Use convenience function to fetch uint
Rather than open coding it.
2020-03-23 14:59:51 +01:00
Benjamin Otte
7f5fd67d3a Merge branch 'wip/albfan/protect-begin_move_drag' into 'gtk-3-24'
Define begin_move_drag for GdkOffScreenWindow

See merge request GNOME/gtk!1548
2020-03-21 10:06:35 +00:00
Alberto Fanjul
46b92412a7 Define begin_move_drag
Avoid crashes calling it on drag and drop gestures

fixes #2532
2020-03-21 10:44:08 +01:00
Matthias Clasen
72689c52a5 Merge branch 'adwaita-tnum' into 'gtk-3-24'
theme: use tabular figures where appropriate

See merge request GNOME/gtk!1493
2020-03-20 20:35:57 +00:00
Carlos Garnacho
2647dc1d98 Merge branch 'imm-context-use-after-free' into 'gtk-3-24'
Fix crash with certain IME

See merge request GNOME/gtk!1290
2020-03-20 15:05:43 +00:00
Mantas Kriaučiūnas
837febc3c3 Update Lithuanian translation 2020-03-20 09:45:38 +00:00
Matthias Clasen
9944d66165 Merge branch 'wip/chergert/gtk3-speedup-char_is_invisible' into 'gtk-3-24'
GTK3: short-circuit char visibility check when possible

See merge request GNOME/gtk!1536
2020-03-18 22:15:24 +00:00
Christian Hergert
9fc7c3b1b3 textbtree: short-circuit visibility check when possible
If we have never seen a GtkTextTag in the GtkTextTagTable with the
invisible bit set, then we do not need to go through the process of
checking the accumulated tags.

Not using invisible tags is overwhelmingly the common case.
2020-03-18 12:56:19 -07:00
Christian Hergert
2aba6f0ba4 texttag: avoid use of g_signal_emit_by_name()
This avoids looking up the signal by name and instead uses the saved
signal identifier from gtktexttagtable.c
2020-03-18 12:50:32 -07:00
Christian Hergert
4f0842c713 texttagtable: move private functions to gtktexttagtableprivate.h
This makes backporting changes from 4.x a bit easier.
2020-03-18 12:42:40 -07:00
Emmanuele Bassi
e77139c6bb Merge branch 'wip/carlosg/fix-surrounding-text' into 'gtk-3-24'
imwayland: Fix typo in code

See merge request GNOME/gtk!1533
2020-03-18 16:30:16 +00:00
Carlos Garnacho
965a85a0d3 imwayland: Fix typo in code
To find the middle of the string, we should check both cursor/anchor.
This is actually a backport of commit 8fc360dac5 in master.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/2522
2020-03-18 16:59:58 +01:00
Jakub Steiner
5be08a4d09 Adwaita: dark switches/check/radios
- unescape variables (gtk3 didn't raise warnings like gtk4, but it was broken)
2020-03-18 13:07:05 +01:00
Jakub Steiner
71bdf20cff Adwaita: dark switches/check/radios
- lighten up radios, switches and checkboxes

Fixes https://gitlab.gnome.org/GNOME/gtk/issues/2461
2020-03-17 11:19:50 +01:00