gtk4.git
2 years agoWindow: Copy caveats from :*visible to the setters
Daniel Boles [Thu, 1 Jun 2023 19:31:22 +0000 (20:31 +0100)]
Window: Copy caveats from :*visible to the setters

2 years agoWindow: Fix wrong case in property attribute which
Daniel Boles [Thu, 1 Jun 2023 19:26:57 +0000 (20:26 +0100)]
Window: Fix wrong case in property attribute which

rendered the literal text `org.gtk.MEthod.set_property focus-visible`.

2 years agolabel: Fix crashes when executing a11y actions
Erik Schilling [Wed, 31 May 2023 12:27:48 +0000 (12:27 +0000)]
label: Fix crashes when executing a11y actions

2 years agoactionmuxer: Correctly notify actions after reparenting
Alice Mikhaylenko [Thu, 1 Jun 2023 02:27:10 +0000 (06:27 +0400)]
actionmuxer: Correctly notify actions after reparenting

When registering an observer, we send a notification and for that we need
to query the action's state and param type. When setting up a muxer parent,
same thing happens, except the action is queried on the parent instead.

This means that the muxer will notify observers about the parent's actions,
but not about its own.

Add a test to verify it works.

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/5861

2 years agogdkselectioninputstream-x11: Explicitly handle stream ownership in signal
Marco Trevisan (Treviño) [Tue, 30 May 2023 15:59:06 +0000 (17:59 +0200)]
gdkselectioninputstream-x11: Explicitly handle stream ownership in signal

The display xevent signal connection takes the ownership of the stream
until we get a valid event, so it should manage the stream lifetime.

So make this clearer, by automatically removing the stream reference
when we disconnect from the xevent signal handler.

2 years agogdkselectioninputstream-x11: Make it clearer how we manage the stream ownership
Marco Trevisan (Treviño) [Tue, 30 May 2023 15:54:00 +0000 (17:54 +0200)]
gdkselectioninputstream-x11: Make it clearer how we manage the stream ownership

It gets unreffed during gdk_x11_selection_input_stream_complete, so use
APIs that make this clearer.

2 years agogtkselectioninputstream-x11: Do not add an extra reference to the returned stream
Marco Trevisan (Treviño) [Tue, 30 May 2023 15:50:56 +0000 (17:50 +0200)]
gtkselectioninputstream-x11: Do not add an extra reference to the returned stream

We create a new stream during gdk_x11_selection_input_stream_new_async()
then such stream is referenced when passed to the task via
g_task_return_pointer(), so there's no need to reference it again before
returning it, or we'd end up leaking.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/4892
2 years agogtkselectioninputstream-x11: Do not add unreffed bytes to the chunks queue
Marco Trevisan (Treviño) [Tue, 30 May 2023 15:43:57 +0000 (17:43 +0200)]
gtkselectioninputstream-x11: Do not add unreffed bytes to the chunks queue

This should never happen, but we may exit the loop because of count value
with an unreffed bytes pointer being added back to the chunks queue.

2 years agogtkselectioninputstream-x11: Do not add EOF marker twice to the chunks queue
Marco Trevisan (Treviño) [Tue, 30 May 2023 15:42:59 +0000 (17:42 +0200)]
gtkselectioninputstream-x11: Do not add EOF marker twice to the chunks queue

We were adding the same EOF marker two times back to the chunks queue,
one implicitly, and the other time could happen when exiting the loop.

2 years agoCheck for NULL groups in gtk_action_muxer_get_group ()
Luca Bacci [Wed, 17 May 2023 12:00:56 +0000 (14:00 +0200)]
Check for NULL groups in gtk_action_muxer_get_group ()

The groups hash table is initialized lazily when inserting
the first GActionGroup (gtk_action_muxer_insert ()). Do as
all surrounding code does and check for NULL before using
groups.

This avoids triggering a warning

2 years agoMenuButton: Always mention child@always-show-arrow
Daniel Boles [Sun, 28 May 2023 10:35:44 +0000 (11:35 +0100)]
MenuButton: Always mention child@always-show-arrow

get_always_show_arrow() did not mention at all that the custom child is
relevant. set_always_show_arrow() only did in the blurb, not for the arg

2 years agodocs: add HSL to Gdk.RGBA.parse
FineFindus [Thu, 25 May 2023 15:16:55 +0000 (17:16 +0200)]
docs: add HSL to Gdk.RGBA.parse

Update the Gdk.RGBA.parse docs to reflect the ability to parse HSL, which has been added in 4.5.0.

2 years agowin32: Invalidate inactive monitors
Jason Francis [Wed, 24 May 2023 21:34:34 +0000 (17:34 -0400)]
win32: Invalidate inactive monitors

Without this, there are still GdkMonitors present for displays that are
present but disconnected (such as when a laptop disables the internal
display to connect to an external monitor).

2 years agoglx: Implement support for EXT_swap_control
Benjamin Otte [Thu, 18 May 2023 00:02:03 +0000 (02:02 +0200)]
glx: Implement support for EXT_swap_control

XWayland (at least on gnome-shell) does not support SGI_swap_control,
which we were using to unset the swap interval.

It does support EXT_swap_control though, which is the more modern
version of the same thing, so this commit adds support for that.

And now GDK_DEBUG=no-vsync gives me >1000fps instead of just 60fps,

2 years agogtkeventcontrollerscroll: Send lores scroll in the middle of the detent
José Expósito [Mon, 17 Oct 2022 17:10:37 +0000 (19:10 +0200)]
gtkeventcontrollerscroll: Send lores scroll in the middle of the detent

Some mice send a value slightly lower than 120 for some detents. The
current approach waits until a value of 120 is reached before sending a
low-resolution scroll event.

For example, the MX Master 3 sends a value of 112 in some detents:

              detent                   detent
    |                        |                       |
                        ^    ^                    ^
                        112  REL_WHEEL            224

As illustrated, only one event was sent but two were expected. However,
sending the low-resolution scroll event in the middle plus the existing
heuristics to reset the accumulator solve this issue:

              detent                   detent
    |                        |                       |
                ^          ^             ^          ^
                REL_WHEEL  112           REL_WHEEL  224

Send low-resolution scroll events in the middle of the detent to solve
this problem.

Related to https://gitlab.gnome.org/GNOME/mutter/-/issues/2469

2 years agoMenuButton: Fix small grammar-o/match related syms
Daniel Boles [Mon, 22 May 2023 20:39:36 +0000 (21:39 +0100)]
MenuButton: Fix small grammar-o/match related syms

2 years agomenus: Avoid unnecessary right padding
Matthias Clasen [Mon, 22 May 2023 20:14:17 +0000 (16:14 -0400)]
menus: Avoid unnecessary right padding

We are using placeholders in the 'check' column
that are put in a size group, so that they all
take the same space once a check or radio is shown.

Unfortunately, for the inline-buttons option, we
were using a GtkBuiltinIcon as placeholder, and those
respect the -gtk-icon-size CSS property and take
a minimum size of 16px. Use a GtkGizmo instead to
get the expected result of no extra padding unless
there's a check or radio.

Fixes: #5839
2 years agogtk/recentmanager: Fix date leak
Khalid Abu Shawarib [Mon, 22 May 2023 12:25:24 +0000 (12:25 +0000)]
gtk/recentmanager: Fix date leak

2 years agoFix typo in CSS docs
Arjan Molenaar [Sat, 20 May 2023 12:11:58 +0000 (14:11 +0200)]
Fix typo in CSS docs

2 years agofilelauncher: Use ShowItems to show in File Manager
Calvin Walton [Sat, 20 May 2023 23:25:43 +0000 (19:25 -0400)]
filelauncher: Use ShowItems to show in File Manager

The non-portal fallback method for launching a file manager to show the
file in its parent directory was incorrectly using the `ShowFolders`
method (open a folder) instead of `ShowItems` (open the parent directory
and show the file).

The `show_item` function (previously `show_folder`) had an unused
`callback` parameter; it has been removed and the type of the parameter
containing the GTask has been renamed and now uses the correct type
instead of gpointer to reduce the amount of casting required.

Fixes GNOME/gtk#5842

2 years agoroaring: Mark a variable as unused
Matthias Clasen [Thu, 18 May 2023 12:34:48 +0000 (08:34 -0400)]
roaring: Mark a variable as unused

Otherwise clang complains.

2 years agoscrolledwindow: Propagate child measure size whenever possible
Fina Wilke [Wed, 17 May 2023 22:55:50 +0000 (00:55 +0200)]
scrolledwindow: Propagate child measure size whenever possible

In height-for-width and hscrollbar-policy = never, we can provide
the child with a proper for_size when measuring it. The same is true for
width-for-height and vscrollbar-policy = never.

This allows for accurately measuring the size of eg. wrapping labels.

2 years agogsk: Fix a crash
Matthias Clasen [Tue, 16 May 2023 21:32:13 +0000 (17:32 -0400)]
gsk: Fix a crash

When we start ignoring batches, we must do it everywhere,
or we may run into assertions. This was triggered by an
enormous text node tree produced by tests/rendernode-create.

2 years agonode-editor: Print default renderer in title
Benjamin Otte [Fri, 12 May 2023 15:16:22 +0000 (17:16 +0200)]
node-editor: Print default renderer in title

If there is a value passed to GSK_RENDERER, display it in the window
title.

This is mostly so that when I show off screenshots, people know what
renderer I'm using.

2 years agorendernode: clip when drawing shadows
Benjamin Otte [Fri, 5 May 2023 02:53:08 +0000 (04:53 +0200)]
rendernode: clip when drawing shadows

Ensures the shadow stays small.

2 years agocss: Remove crashy resource:// optimization
Benjamin Otte [Fri, 12 May 2023 17:20:58 +0000 (19:20 +0200)]
css: Remove crashy resource:// optimization

Using gdk_texture_new_from_resource() is not valid here because we are
not sure if the given resource is valid.

Plus, the previous optimization is no longer relevant, because we are
not using gdk_pixbuf_new_from_resource() anymore - which was what this
optimization was about before it was ported to GdkTexture.

Test attached.

2 years agogdk: Clamp frame region to surface size
Benjamin Otte [Sat, 13 May 2023 16:35:02 +0000 (18:35 +0200)]
gdk: Clamp frame region to surface size

The region may be larger than the surface's size, but many rendering
APIs require the size to be clamped.

Fixes #5812

2 years agoFix a few bugs in GtkPropertyLookupListModel
Matthias Clasen [Tue, 16 May 2023 15:54:59 +0000 (11:54 -0400)]
Fix a few bugs in GtkPropertyLookupListModel

Fix bugs in property types.

2 years agofilesystemmodel: Ignore changes on the parent directory
Corey Berla [Mon, 15 May 2023 20:10:21 +0000 (13:10 -0700)]
filesystemmodel: Ignore changes on the parent directory

The filesystemmodel tracks changes and additions to child files
through G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGED.  This event will also
occur if the parent directory is changed.  Since the parent directory
doesn't exist in the model, it creates a non-existent item.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/4233
2 years agofilechooserwidget: Stop leaking file system models
Corey Berla [Mon, 15 May 2023 20:09:52 +0000 (13:09 -0700)]
filechooserwidget: Stop leaking file system models

2 years agodoc/actions: Fix end-of-file :
FeRD (Frank Dana) [Sun, 14 May 2023 21:01:38 +0000 (17:01 -0400)]
doc/actions: Fix end-of-file :

The actions document ended with a : where there used to be a period,
seemingly a bug in the conversion from XML. Replace that : with a
period, and remove another spurious : inserted during the conversion.

2 years agodocs/input: <kbd>␣</kbd> => <kbd>Space</kbd>
FeRD (Frank Dana) [Sun, 14 May 2023 20:23:41 +0000 (16:23 -0400)]
docs/input: <kbd>␣</kbd> => <kbd>Space</kbd>

- Switch to semantic newlines, where adding <kbd> caused wrapped text
  to grow wider than 80 characters on some lines.

2 years agodocs/input-handling: A few more <kbd> wrappings
FeRD (Frank Dana) [Sun, 14 May 2023 20:20:33 +0000 (16:20 -0400)]
docs/input-handling: A few more <kbd> wrappings

- Format a few missed keypresses/combos using <kbd>
- Switch to semantic newlines for those (paragraphs, bullet points)

2 years agodocs/input-handling: Don't leave reader hanging
FeRD (Frank Dana) [Sun, 14 May 2023 09:18:48 +0000 (09:18 +0000)]
docs/input-handling: Don't leave reader hanging

Strangely, the document's last sentence ended with a colon,
giving the impression there's missing text that should follow.
There is not.

Even more strange, it's _always_ ended with a colon,
ever since the file was converted from XML
(in commit 10cd539104af54f5d1d1e49618f5aa9d8ac42074).

BUT, the XML file it was converted _from_ ended that same sentence
with a period! I have no idea where the colon came from.

2 years agoAdd a README to examples/hello
Matthias Clasen [Sun, 14 May 2023 00:11:56 +0000 (20:11 -0400)]
Add a README to examples/hello

Just so nobody wonders why there's a meson.build
in this subdirectory.

2 years agoWidget: Fix doubled word need, missing possessives
Daniel Boles [Sat, 13 May 2023 17:17:17 +0000 (18:17 +0100)]
Widget: Fix doubled word need, missing possessives

2 years agopopover: Stop making assumptions about corners
Matthias Clasen [Sat, 13 May 2023 11:35:05 +0000 (07:35 -0400)]
popover: Stop making assumptions about corners

The popover tail drawing code was just assuming that
the corner values are numbers. Which they won't, anymore.

2 years agocss: Fix initial rotate transform value
Matthias Clasen [Fri, 12 May 2023 22:11:14 +0000 (18:11 -0400)]
css: Fix initial rotate transform value

2 years agocss: Make some corner values static
Matthias Clasen [Fri, 12 May 2023 18:48:45 +0000 (14:48 -0400)]
css: Make some corner values static

Provide static value for uniform corners
with lengths from 0 to 8px. This covers
the majority of corners in widget-factory.

2 years agocss: More static length values
Matthias Clasen [Fri, 12 May 2023 18:47:36 +0000 (14:47 -0400)]
css: More static length values

Make all length values from 0px to 8px available
as static values. This will help with cutting
down on the number of corner values (we have a
lot of 5px corners).

2 years agoRevert "csscornervalue: Accept other values if x == y"
Matthias Clasen [Fri, 12 May 2023 18:04:59 +0000 (14:04 -0400)]
Revert "csscornervalue: Accept other values if x == y"

This reverts commit 1f2f2777e1231468f613a2936989ded060f4e2a6.

It broke transitioning of corner values.

2 years agocss: Correct initial shadow filter values
Matthias Clasen [Fri, 12 May 2023 17:13:12 +0000 (13:13 -0400)]
css: Correct initial shadow filter values

This was using numbers instead of lengths,
causing confusion in the transition code.

2 years agocss: Fix transition of font features
Matthias Clasen [Fri, 12 May 2023 13:13:00 +0000 (09:13 -0400)]
css: Fix transition of font features

If we store ints as values, we better use
g_hash_table_lookup_extended, or zeros will
show up as missing values.

2 years agomediacontrols: Set valign=center on volume button
Maximiliano Sandoval R [Fri, 12 May 2023 09:35:14 +0000 (11:35 +0200)]
mediacontrols: Set valign=center on volume button

To match the play button.

2 years agoOverlay: Add minimal doc blurb for property :child
Daniel Boles [Fri, 12 May 2023 09:30:37 +0000 (10:30 +0100)]
Overlay: Add minimal doc blurb for property :child

2 years agourilauncher: Validate the uri
Matthias Clasen [Thu, 11 May 2023 22:33:23 +0000 (18:33 -0400)]
urilauncher: Validate the uri

We don't want to send nonsense to the portal.

Fixes: #5829
2 years agotests: Stop copying the tool tests
Matthias Clasen [Wed, 10 May 2023 01:21:39 +0000 (21:21 -0400)]
tests: Stop copying the tool tests

No point in doing that, and the meson feature
we are using here is deprecated.

2 years agoUpdate Lithuanian translation
Aurimas Černius [Sun, 4 Jun 2023 20:32:14 +0000 (20:32 +0000)]
Update Lithuanian translation

2 years agoMerge branch 'backport_gtkstack_crash' into 'gtk-4-10'
Matthias Clasen [Tue, 30 May 2023 10:24:10 +0000 (10:24 +0000)]
Merge branch 'backport_gtkstack_crash' into 'gtk-4-10'

Backport the fix from #6031

See merge request GNOME/gtk!6036

2 years agoGtkStack: Fix a potential crash in gtk_stack_get_first_accessible_child
Lukáš Tyrychtr [Mon, 29 May 2023 13:14:51 +0000 (15:14 +0200)]
GtkStack: Fix a potential crash in gtk_stack_get_first_accessible_child

This one can occur when the stack has no pages.

2 years agoMerge branch 'cherry-pick-099955b0' into 'gtk-4-10'
Matthias Clasen [Mon, 29 May 2023 00:14:36 +0000 (00:14 +0000)]
Merge branch 'cherry-pick-099955b0' into 'gtk-4-10'

cherry-picking "gridview: Add border-spacing where it was missed"

See merge request GNOME/gtk!6029

2 years agogridview: Add border-spacing where it was missed
Benjamin Otte [Tue, 16 May 2023 16:08:21 +0000 (18:08 +0200)]
gridview: Add border-spacing where it was missed

We were computing column widths without taking border-spacing into
account, making them slightly too big.

(cherry picked from commit 099955b0c06dbddc9469bd3c8e63673a3a82883f)

2 years agoUpdate Basque translation
Asier Sarasua Garmendia [Thu, 18 May 2023 16:30:55 +0000 (16:30 +0000)]
Update Basque translation

2 years agoUpdate Catalan translation
Jordi Mas [Fri, 12 May 2023 17:42:11 +0000 (19:42 +0200)]
Update Catalan translation

2 years agoUpdate French translation
Guillaume Bernard [Fri, 12 May 2023 13:13:03 +0000 (13:13 +0000)]
Update French translation

2 years agoMerge branch 'cherry-pick-29e71868' into 'gtk-4-10'
Matthias Clasen [Fri, 5 May 2023 03:52:53 +0000 (03:52 +0000)]
Merge branch 'cherry-pick-29e71868' into 'gtk-4-10'

treelistmodel: Be safer during collapsing

See merge request GNOME/gtk!5918

2 years agoMerge branch 'wip/otte/treelistmodel-madness' into 'main'
Benjamin Otte [Wed, 26 Apr 2023 22:06:40 +0000 (22:06 +0000)]
Merge branch 'wip/otte/treelistmodel-madness' into 'main'

treelistmodel: Be safer during collapsing

See merge request GNOME/gtk!5875

(cherry picked from commit 29e71868298448eb7fa570ed0a75935c235262de)

8766a6fa treelistmodel: Be safer during collapsing
3c76f3fb treelistmodel: Delay notifies from TreeListRow

2 years agoMerge branch 'wip/carlosg/invalidate-surface-x11-4-10' into 'gtk-4-10'
Matthias Clasen [Thu, 4 May 2023 19:22:13 +0000 (19:22 +0000)]
Merge branch 'wip/carlosg/invalidate-surface-x11-4-10' into 'gtk-4-10'

gdk/x11: Invalidate whole surface after size change (4.10)

See merge request GNOME/gtk!5916

2 years agogdk/x11: Invalidate whole surface after size change
Carlos Garnacho [Fri, 21 Apr 2023 08:58:19 +0000 (10:58 +0200)]
gdk/x11: Invalidate whole surface after size change

The Expose events following a ConfigureNotify may arrive at
a time that we did not resize the surface yet, making these
expose events a no-op. Even though gsk/gtk take care of the
window content itself, this might lead to unrendered portions
of the window shadow.

This may be seen with GSK_RENDERER=cairo and GDK_BACKEND=x11,
attempting to tile a window (e.g. gtk4-demo) left or right.
The window will show black rectangles or other artifacts in
the window shadow areas that correspond to the newly painted
portions (as the window needs to expand vertically).

In order to fix this with a similar behavior to Wayland,
consider ourselves the whole surface invalidated after resize,
in order to ensure everything is painted from scratch.

(cherry-picked from commit 24302315fb8f46be141a9eda60e8d107c84a948d)

2 years agoUpdate Persian translation
Danial Behzadi [Wed, 3 May 2023 09:00:53 +0000 (09:00 +0000)]
Update Persian translation

2 years agoMerge branch 'backport-css-fix-to-gtk-4-10' into 'gtk-4-10'
Matthias Clasen [Tue, 2 May 2023 22:21:09 +0000 (22:21 +0000)]
Merge branch 'backport-css-fix-to-gtk-4-10' into 'gtk-4-10'

Backport "css: Don't transition to currentColor" to gtk-4-10

See merge request GNOME/gtk!5911

2 years agocss: Don't transition to currentColor
Benjamin Otte [Tue, 2 May 2023 17:48:54 +0000 (19:48 +0200)]
css: Don't transition to currentColor

Transition to the color that is in use instead.

Fixes crashes because currentColor is not an RGBA color and
therefor could not be queried later.

Fixes #5798

2 years agoUpdate Chinese (China) translation
Boyuan Yang [Fri, 28 Apr 2023 18:46:49 +0000 (18:46 +0000)]
Update Chinese (China) translation

2 years agoUpdate Indonesian translation
Kukuh Syafaat [Fri, 28 Apr 2023 05:33:27 +0000 (05:33 +0000)]
Update Indonesian translation

2 years agoMerge branch 'cherry-pick-c5a53f23' into 'gtk-4-10'
Matthias Clasen [Thu, 27 Apr 2023 08:57:59 +0000 (08:57 +0000)]
Merge branch 'cherry-pick-c5a53f23' into 'gtk-4-10'

Merge branch 'wip/otte/trelistmodel-fixage' into 'main'

See merge request GNOME/gtk!5873

2 years agoMerge branch 'wip/otte/trelistmodel-fixage' into 'main'
Matthias Clasen [Wed, 29 Mar 2023 02:23:46 +0000 (02:23 +0000)]
Merge branch 'wip/otte/trelistmodel-fixage' into 'main'

treelistmodel: Don't add items in reverse

Closes #5707

See merge request GNOME/gtk!5744

(cherry picked from commit c5a53f235a2ed1b0acd0a8c29153e62377262d04)

1718db14 treelistmodel: Don't add items in reverse
cd860beb Add a test for splicing treelistmodel

2 years agoUpdate Galician translation
Fran Dieguez [Tue, 25 Apr 2023 23:22:20 +0000 (23:22 +0000)]
Update Galician translation

2 years agoUpdate Turkish translation
Sabri Ünal [Sun, 23 Apr 2023 21:12:30 +0000 (21:12 +0000)]
Update Turkish translation

2 years agoUpdate Swedish translation
Anders Jonsson [Sun, 23 Apr 2023 09:58:47 +0000 (09:58 +0000)]
Update Swedish translation

2 years agoUpdate Ukrainian translation
Yuri Chornoivan [Sat, 22 Apr 2023 18:19:13 +0000 (18:19 +0000)]
Update Ukrainian translation

2 years agoUpdate Russian translation
Aleksandr Melman [Sat, 22 Apr 2023 12:20:35 +0000 (12:20 +0000)]
Update Russian translation

2 years agoPost-release version bump
Matthias Clasen [Sat, 22 Apr 2023 10:38:20 +0000 (12:38 +0200)]
Post-release version bump

2 years ago4.10.3
Matthias Clasen [Sat, 22 Apr 2023 10:28:21 +0000 (12:28 +0200)]
4.10.3

2 years agoMerge branch 'cherry-pick-0ce6bc67' into 'gtk-4-10'
Matthias Clasen [Sat, 22 Apr 2023 10:19:35 +0000 (10:19 +0000)]
Merge branch 'cherry-pick-0ce6bc67' into 'gtk-4-10'

filesystemmodel: Emit items-changed when modifying attributes

See merge request GNOME/gtk!5860

2 years agoUpdate Polish translation
Piotr Drąg [Sat, 22 Apr 2023 09:16:08 +0000 (11:16 +0200)]
Update Polish translation

2 years agoUpdate Slovenian translation
Martin [Sat, 22 Apr 2023 07:35:34 +0000 (07:35 +0000)]
Update Slovenian translation

2 years agoMerge branch 'fix-popover-positioning-4-10' into 'gtk-4-10'
Matthias Clasen [Sat, 22 Apr 2023 06:59:59 +0000 (06:59 +0000)]
Merge branch 'fix-popover-positioning-4-10' into 'gtk-4-10'

popover: Fix positioning

See merge request GNOME/gtk!5859

2 years agofilesystemmodel: Emit items-changed when modifying attributes
Olivier Crête [Sat, 22 Apr 2023 05:54:57 +0000 (05:54 +0000)]
filesystemmodel: Emit items-changed when modifying attributes

(cherry picked from commit 0ce6bc677e339b2af213377773e184674cb45c87)

2 years agopopover: Fix positioning
Matthias Clasen [Sat, 22 Apr 2023 06:33:07 +0000 (08:33 +0200)]
popover: Fix positioning

2 years agoUpdate Portuguese translation
Hugo Carvalho [Fri, 21 Apr 2023 14:30:47 +0000 (14:30 +0000)]
Update Portuguese translation

2 years agoPost-release version bump
Matthias Clasen [Fri, 21 Apr 2023 14:22:28 +0000 (16:22 +0200)]
Post-release version bump

2 years ago4.10.2
Matthias Clasen [Fri, 21 Apr 2023 09:31:06 +0000 (11:31 +0200)]
4.10.2

2 years agoMove some nonworking reftests to xfail
Matthias Clasen [Fri, 21 Apr 2023 14:00:02 +0000 (16:00 +0200)]
Move some nonworking reftests to xfail

A few of the inscription reftests have been failing since 4.10.1.
Move them to xfail until somebody shows up to fix them.

2 years agoUpdate Georgian translation
Ekaterine Papava [Fri, 21 Apr 2023 13:53:46 +0000 (13:53 +0000)]
Update Georgian translation

2 years agoMerge branch 'backports-for-4-10' into 'gtk-4-10'
Matthias Clasen [Fri, 21 Apr 2023 07:58:08 +0000 (07:58 +0000)]
Merge branch 'backports-for-4-10' into 'gtk-4-10'

Accumulated backports for 4.10

This branch has my cherry-picks from main since we branched after 4.10.1.
Two inscription reftests are failing, but they were also failing before.

See merge request GNOME/gtk!5856

2 years agogdk/win32: drop some unused variables
Marc-André Lureau [Sun, 16 Apr 2023 17:23:49 +0000 (21:23 +0400)]
gdk/win32: drop some unused variables

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2 years agogdk: drop libangle GLES minimum version
Marc-André Lureau [Sat, 15 Apr 2023 10:33:20 +0000 (14:33 +0400)]
gdk: drop libangle GLES minimum version

GLES 2.0 version is fine now with current gtk according to B. Otte.
Let's use the same minimum requirement for all implementations.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2 years agogdk: use GLES when on win32/ANGLE
Marc-André Lureau [Thu, 13 Apr 2023 15:22:21 +0000 (19:22 +0400)]
gdk: use GLES when on win32/ANGLE

When using GDK_DEBUG=gl-egl, we end up using GL, but that is not well supported:

Creating EGL context version 3.0 (debug:no, forward:no, legacy:yes, es:no)
Created EGL context[0000000000000004]
OpenGL version: 0.0 (legacy)
* GLSL version: (NULL)
* Max texture size: -1059701680
* Extensions checked:
 - GL_KHR_debug: no
 - GL_EXT_unpack_subimage: yes
 - OES_vertex_half_float: no

** (gtk4-demo.exe:14324): WARNING **: 19:16:41.468: Compile failure in
vertex shader:
ERROR: 0:7: 'gl_Position' : undeclared identifier
---8<---

Use GLES when EGL implementation is ANGLE.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2 years agogdk: drop unused vertex_array_object
Marc-André Lureau [Sat, 15 Apr 2023 10:35:04 +0000 (14:35 +0400)]
gdk: drop unused vertex_array_object

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2 years agoglrenderer: Don't try to use float framebuffers on GLES2
Benjamin Otte [Mon, 17 Apr 2023 03:41:34 +0000 (05:41 +0200)]
glrenderer: Don't try to use float framebuffers on GLES2

GLES doesn't know what that is.

2 years agotestsuite: Skip focus tests when necessary
Matthias Clasen [Sun, 16 Apr 2023 18:58:26 +0000 (20:58 +0200)]
testsuite: Skip focus tests when necessary

If our window does not get focus, we can't reliably
test things that depend on widgets being focused.

2 years agoTry harder to fix focus tests
Matthias Clasen [Sun, 16 Apr 2023 18:07:13 +0000 (20:07 +0200)]
Try harder to fix focus tests

The focus test now asserts that its window is active.
So we should not run them in parallel with other tests,
since those might steal the focus.

2 years agotestsuite: Fix broken test to not unref surfaces twice
Benjamin Otte [Sun, 16 Apr 2023 14:57:48 +0000 (16:57 +0200)]
testsuite: Fix broken test to not unref surfaces twice

The test doesn't hold 2 references, it holds only one.

The reason one unref can cause a leak is that some backends - like X11 -
only destroy the surface once the DestroyNotify event from the X server
has come in.

2 years agowayland: Don't leak all surfaces
Benjamin Otte [Fri, 21 Apr 2023 07:26:23 +0000 (09:26 +0200)]
wayland: Don't leak all surfaces

X11 does add an extra reference to surfaces that gets released when the
DestroyNotify event arrives.
Wayland doesn't ave such an event, so that reference never gets
released.

This fixes a copy/paste error introduced in commit 590f3dfa1fcb.

2 years agowayland: Don't insta-crash when a surface gets disposed
Benjamin Otte [Sun, 16 Apr 2023 02:36:12 +0000 (04:36 +0200)]
wayland: Don't insta-crash when a surface gets disposed

We want to remove the event queue from the list of event queues, not the
surface.
Otherwise the freed queue stays in the list and the next time an event
comes in, we access invalid memory.

Fixes thinko introduced in commit 7fafa5133b5.

Luckily, we leak all surfaces, so this problem never occured.

2 years agotestsuite: Actually wait for focus
Matthias Clasen [Sun, 16 Apr 2023 07:11:24 +0000 (09:11 +0200)]
testsuite: Actually wait for focus

We were failing to properly iterate the main
context here. Oops.

2 years agotests: Check is-focus instead of has-focus
Matthias Clasen [Sun, 16 Apr 2023 06:50:35 +0000 (08:50 +0200)]
tests: Check is-focus instead of has-focus

We are not presenting windows here.

2 years agotext: Fix fallout from focus changes
Matthias Clasen [Sun, 16 Apr 2023 06:49:20 +0000 (08:49 +0200)]
text: Fix fallout from focus changes

We don't get proper notification for when the toplevel
is-active property changes, so monitor has-focus, and
update cursor blinking.

2 years ago| method ...
Cam Cook [Sun, 16 Apr 2023 01:48:27 +0000 (21:48 -0400)]
| method                                                                                | current                                                         | suggestion                                                           |
|---------------------------------------------------------------------------------------|-----------------------------------------------------------------|----------------------------------------------------------------------|
| [get_attributes](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtklabel.c#L3242) | "use`pango_layout_get_attribute (gtk_label_get_layout (self))`" | "use`pango_layout_get_attributes (gtk_label_get_layout (self))`" [1] |
| [set_yalign](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtklabel.c#L5897)     | "(attributes org.gtk.Method.get_property=yalign)"               | "(attributes org.gtk.Method.set_property=yalign)"                    |
| [get_yalign](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtklabel.c#L5923)     | "(attributes org.gtk.Method.set_property=yalign)"               | "(attributes org.gtk.Method.get_property=yalign)"                    |
| [set_ellipsize](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtklabel.c#L3892)  | "to ellipsizei"                                                 | "to ellipsize"                                                       |
| [get_attributes](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtklabel.c#L3239) | "from the labels markup"                                        | "from the label's markup"                                            |

[1] https://docs.gtk.org/Pango/method.Layout.get_attributes.html

2 years ago| method ...
Cam Cook [Sat, 15 Apr 2023 16:41:13 +0000 (12:41 -0400)]
| method                                                                                          | current                                                    | suggestion                                                |
|-------------------------------------------------------------------------------------------------|------------------------------------------------------------|-----------------------------------------------------------|
| [Entry/set_invisible_char](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkentry.c#L2101) | "(attributes org.gtk.Method.sets_property=invisible-char)" | "(attributes org.gtk.Method.set_property=invisible-char)" |
| [FlowBox::activate](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkflowbox.c#L541)       | "This can be happen either by"                             | "This can happen either by"                               |