Commit Graph

77561 Commits

Author SHA1 Message Date
Benjamin Otte
cbb0cbb5bd rendernode: Allocate right amount of memory
asan randomly failed when this almost correct code wasn't quite correct.

Hopefully this is the correct incantation to compute the size.

Related: glib#205
2024-01-17 22:24:57 -05:00
Benjamin Otte
a302672ca8 rendernode: Fix a memleak 2024-01-17 22:24:34 -05:00
Benjamin Otte
6e93cd8803 gdkpng: Make the png loader safer against overflows
Load images that result in a texture >4GB in size.

And now let me keep playing with my 60k x 60k image, thanks.
I'm trying to OOM my GPU.
2024-01-17 22:24:12 -05:00
Benjamin Otte
2223abd432 roundedrect: Fix an intersection cornercase
These 2 rectangles used to intersect fine:
  0 0 50 50 / 50 0
  0 0 50 50 / 0 50
But the computed result was:
  0 0 50 50 / 50
which is not a valid rectangle, because the corners overlap.

Make sure such rectangles return NOT_REPRESENTABLE.

The above rectangle has been added to the testsuite.
2024-01-17 22:22:44 -05:00
Emmanuele Bassi
58861ef18e docs: Clarify behaviour of GtkScrolledWindow child accessors
Right now, it's mentioned only in the class description of
GtkScrolledWindow that the accessors of the child property don't
necessarily roundtrip.

Let's make it more clear by expanding the documentation of the setter,
getter, and property.

See: #6275
2024-01-17 22:20:02 -05:00
Emmanuele Bassi
fa817ae092 Fix typo in GtkAspectFrame.yalign accessor
Copy-paste error.

Fixes: #6273
2024-01-17 22:19:26 -05:00
Carlos Garnacho
9c804b3fd7 gtk-demo: Fix typo
Close the quotes in alert dialog message.
2024-01-17 22:18:15 -05:00
FeRD (Frank Dana)
db0a97f374 Docs: Fix unfenced HTML tag in GtkLabel docs 2024-01-17 22:17:17 -05:00
Emmanuele Bassi
a78439a42c Add fallback string for empty inhibit reason
The public gtk_application_inhibit() API allows a NULL reason argument,
and we have a fallback in place when going through the session manager
proxy; when using the inhibit D-Bus API directly, though, we're just
passing a potentially NULL value to g_variant_new_string(), which will
rightfully complain.
2024-01-17 22:17:05 -05:00
g.willems
0347ea896b gtktexthistory: allow set modified in irreversible action
Allow setting the modified flag, but skip propagating the history state update
as it will be done by gtk_text_history_end_irreversible_action().

Fixes #6236
Closes #6236
2024-01-17 22:15:48 -05:00
Matthias Clasen
cf0d017682 Use O_CLOEXEC instead of FD_CLOEXEC
GLib is complaining vocally about this.
2024-01-17 22:15:25 -05:00
Matthias Clasen
9ad7f3cd60 css: Fix opacity handling
We were using the invert value for opacity.
2024-01-17 22:14:45 -05:00
Matthias Clasen
9afe65bc7f wayland: Be more careful when loading cursors
Make sure we don't access the cursor_images array out of bounds.

Related: #6234
2024-01-17 22:14:35 -05:00
Val Och
c1b9a575b7 GtkFontDialog: fix annotation for choose_font_and_features_finish
Parameters in question have callee-allocated semantics.
2024-01-17 22:14:21 -05:00
Emilio Cobos Álvarez
6854078338 [gtk4] gtkopenuriportal: Fix portal close signal.
Same fix. The other instance of this pattern in gtkapplication-dbus.c
does it right.
2024-01-17 22:13:27 -05:00
Emilio Cobos Álvarez
a64c2ed6f0 [gtk4] GtkFileChooserNative: Fix portal close.
This makes closing a portal file chooser work.

Fixes the GTK4 bits of #6225.
2024-01-17 22:13:20 -05:00
Benjamin Otte
a0c632b0d3 columnview: Make sure cells disconnect from their column
When a cell is removed from the columnview, we need to make sure it s
not just removed from the cell (via unset_parent()) but also from the
column.

Previously, we were doing this from dispose(), but this is broken
because dispose() only runs when the refcount goes to zero. But if some
code still has a reference for whatever reason, this won't happen.

So now we do it explicitly together with unset_parent().
2024-01-17 22:09:37 -05:00
Matthias Clasen
38b14c8b0b Merge branch 'fix-wgl-leak-backport-to-gtk-4-12' into 'gtk-4-12'
GdkWin32: Do not create multiple WGL contexts for the dummy window [4.12]

See merge request GNOME/gtk!6697
2024-01-18 03:06:35 +00:00
Ngọc Quân Trần
cbc44e202a Update Vietnamese translation 2024-01-13 07:19:18 +00:00
Emmanuele Bassi
081b8af597 Merge branch 'ebassi/doc-link-fixes-stable' into 'gtk-4-12'
Backport doc fixes from main

See merge request GNOME/gtk!6740
2024-01-12 13:16:41 +00:00
Emmanuele Bassi
39f7f8615b docs: Fix link to GtkSnapshot.restore() 2024-01-12 12:50:51 +00:00
Emmanuele Bassi
d310c9dd92 docs: Fix link to GtkLabel.set_mnemonic_widget() 2024-01-12 12:50:37 +00:00
Matthias Clasen
dbe1804c3a docs: Fix: gdk->gtk and gdk->gsk links
gi-docgen can only generate links for dependencies, so we have
to manually expand to a relative url here.

fixup
2024-01-12 12:46:03 +00:00
Carlos Garnacho
cbf471436a Merge branch 'gtk-4-12-backports' into 'gtk-4-12'
[4.12 backport] gdk/wayland: Reset cursor_is_default on proximity out

See merge request GNOME/gtk!6738
2024-01-12 11:16:45 +00:00
Peter Hutterer
5216670901 gdk/wayland: Reset cursor_is_default on proximity out
For tablet tools if we have NULL cursor, we use the default cursor
instead. This provides us with a tablet cursor when an application never
sets the cursor.

However, on proximity out when we clear said cursor we also
need to toggle off cursor_is_default, otherwise on the next proximity in
we assume we already have a cursor and never update it again.

This leads to an invisible cursor over GTK application when the tablet
tool is brought into proximity over the widget (but not when moving into
the widget from the outside).

Closes: #6312
(cherry picked from commit 04870fc1a1)
2024-01-12 11:57:56 +10:00
Matej Urbančič
274f485248 Update Slovenian translation 2023-12-27 20:44:50 +00:00
Luca Bacci
0345e80770 GdkWin32: Do not create multiple WGL contexts for the dummy window
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/6285
2023-12-27 16:31:34 +01:00
Asier Sarasua Garmendia
5ccbcbbec8 Update Basque translation 2023-12-24 07:29:58 +00:00
Jürgen Benvenuti
7608c5cc88 Update German translation 2023-12-23 22:01:03 +00:00
Matthias Clasen
4774ebca20 Merge branch 'backport-4-12' into 'gtk-4-12'
[4.12] Backport a few Windows and macOS fixes

See merge request GNOME/gtk!6679
2023-12-21 12:31:04 +00:00
sumibi-yakitori
2666cc8cba Fix coding style 2023-12-19 15:51:08 +02:00
sumibi-yakitori
b7cda90b5f macos: change to send motion events to NSApp
This fix addresses a problem where the mouse cursor cannot be changed after it becomes a resize indicator, even in non-CSD windows
2023-12-19 15:50:54 +02:00
Peter Williams
3447ea8ca3 gdk/macos: fix builds on macOS before 10.13
Nothing profound here, just need to get some of the workarounds
into the right places.
2023-12-19 15:46:00 +02:00
g.willems
40c009852d testsuite: only run x11-specific tests if x11 enabled
Some testcases rely on X11 support, which is not always available,
typically on win32.
Skip them if the x11 backend is disabled.
2023-12-19 15:45:24 +02:00
g.willems
6cdff5ba2b testsuite: fix icontheme test failure on win32
g_str_has_suffix() fails due to different path separators.
Compare URIs instead.
2023-12-19 15:44:41 +02:00
g.willems
18a18d9e7d gdk/win32: support default-settings debug flag 2023-12-19 15:43:14 +02:00
Arjan Molenaar
fbcc280b6a macos: Add method that denotes secure restorable state
Fix process injection vulnerability on macOS.
2023-12-19 15:32:44 +02:00
g.willems
4b350db909 win32: precalculate keymap at display opening
The default keymap and keymap layouts are calculated on request.
If done once a surface is setup and listening at win32 events,
we may then enter in a recursive loop.
To avoid this, precalculate the keymap as soon as displays are open.

Fixes #6203
Closes #6203
2023-12-19 15:31:07 +02:00
g.willems
8ec7c3bc21 win32: switch to new clipboard API
This is a backport of !1143 to gtk4.

SetClipboardViewer() API is obsolete is prone to clipboard chain breaks
from other applications.
Use recommended AddClipboardFormatListener() instead.

Fixes #442
2023-12-19 15:30:43 +02:00
Yaron Shahrabani
2bf58d486d Update Hebrew translation 2023-12-09 21:59:53 +00:00
Matthias Clasen
58960c890d Merge branch 'gtk-4-12-emoji-15.1' into 'gtk-4-12'
emoji: Update data to CLDR v44

See merge request GNOME/gtk!6645
2023-12-08 07:03:34 +00:00
Aurimas Černius
7a0e8ade38 Update Lithuanian translation 2023-12-07 20:55:22 +00:00
Jeremy Bícha
e42befb76b emoji: Update data to CLDR v44
Based on emojibase v15.3.0

Contains the changes in Unicode 15.1

https://unicode.org/versions/Unicode15.1.0/
https://cldr.unicode.org/index/downloads/cldr-44
https://github.com/milesj/emojibase/blob/emojibase-data%4015.3.0/packages/data/CHANGELOG.md
(cherry picked from commit 76a1f1714d)
2023-12-06 07:55:42 -05:00
Jeremy Bícha
f947f23687 emoji: Update data to CLDR v43
Based on emojibase v15.2.0

Contains the changes in Unicode 15.0

https://unicode.org/versions/Unicode15.0.0/
https://cldr.unicode.org/index/downloads/cldr-43
https://github.com/milesj/emojibase/blob/emojibase-data%4015.2.0/packages/data/CHANGELOG.md
(cherry picked from commit bf35836350)
2023-12-06 07:55:23 -05:00
sudip
322d9e5c3f add hi-ja-et-fi-nb-th for gtkemojichooser
(cherry picked from commit 49fbbfb6cc)
2023-12-06 07:55:11 -05:00
sudip
4b2145475e add bengali language bn.data for gtkemojichooser
(cherry picked from commit 16806294e3)
2023-12-06 07:55:03 -05:00
Matthias Clasen
e22cc913c5 Merge branch 'wip/sophie-h/backport-mr-6586' into 'gtk-4-12'
Backport "file dialog: Return an error if no file is selected"

See merge request GNOME/gtk!6641
2023-12-04 01:29:57 +00:00
Matthias Clasen
ba3e8eee8b file dialog: Return an error if no file is selected
This was brought as a problem for bindings in #6139.

Fixes: #6139
2023-12-03 12:34:36 +01:00
Boyuan Yang
8f91167c30 Update Chinese (China) translation 2023-12-03 01:38:52 +00:00
Daniel Rusek
8da82c6206 Update Czech translation 2023-11-30 18:24:11 +00:00