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.
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.
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.
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.
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.
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.
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
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" |
Benjamin Otte [Sat, 15 Apr 2023 15:50:18 +0000 (17:50 +0200)]
gles: Don't use vertex array objects
They're not needed and GLES doesn't technically support them, even
though GTK had been using them via epoxy sneakily using the
GL_OES_vertex_array_object extension behind our back.
Matthias Clasen [Sat, 15 Apr 2023 13:02:09 +0000 (15:02 +0200)]
text: Only claim primary when focused
It does not make sense otherwise, and has unfortunate
side-effects on Wayland.
Matthias Clasen [Sat, 15 Apr 2023 13:00:53 +0000 (15:00 +0200)]
wayland: Improve logging for primary selection
Matthias Clasen [Sat, 15 Apr 2023 12:58:57 +0000 (14:58 +0200)]
window: Don't mark widget prematurely as has-focus
has-focus is defined is-focus && toplevel::is-active.
We were forgetting to look at is_active when handling
focus widget changes.
Marco Trevisan (Treviño) [Fri, 14 Apr 2023 16:05:21 +0000 (18:05 +0200)]
gtk: Improve documentation on returned nodes for snapshot
Closes: #5747
Matthias Clasen [Thu, 13 Apr 2023 05:23:06 +0000 (07:23 +0200)]
openuriportal: Detect if the interface isn't there
Check the portal version number before trying to use
it. Most importantly, this will detect the case where
the interface isn't supported at all, since the proxy
will report a version of 0 in that case.
Fixes: #5733
Alexander Mikhaylenko [Wed, 12 Apr 2023 17:05:23 +0000 (21:05 +0400)]
printunixdialog: Remove a redundant style class
.view does absolutely nothing in Default style since the whole box is
covered with a GtkNotebook which has its own background, and adds an
unwanted background onto the tab strip in Adwaita.
Marco Trevisan (Treviño) [Tue, 11 Apr 2023 22:41:20 +0000 (00:41 +0200)]
gtk/dialogs: Destroy the window promptly on finish async function
Some bindings (GJS!) could add temporary references to the GAsyncResult
argument that we return, and thus to the GTask, which may cause the
dialog not to close when the finish function is called (but at garbage
collection instead!).
To prevent this, just manually destroy the window (by removing the task
data), so that we are not bound to the GTask lifetime anymore.
Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/5741
Matthias Clasen [Wed, 12 Apr 2023 10:08:14 +0000 (12:08 +0200)]
filechooserentry: Plug a memory leak
Matthias Clasen [Wed, 12 Apr 2023 10:07:30 +0000 (12:07 +0200)]
filechooserentry: Make filtering work again
We need to look at the filchooser::filtered-out
attribute to know which files the filesystem model
has filtered away.
Fixes: #5743
Carlos Garnacho [Wed, 12 Apr 2023 09:24:46 +0000 (11:24 +0200)]
textview: Reset press counter if double/triple clicking on a different line
If we click close enough between lines, and with the maximum distances applied
by GtkGestureClick we could jump between lines when handling double/triple
click for word/line selection.
Ensure that the whole operation stays in the same line and reset the
gesture/counter if we do move between lines, so we start from scratch in the
new line.
G.Willems [Tue, 11 Apr 2023 21:53:35 +0000 (23:53 +0200)]
scalebutton: fix orientation not applied to scale
G.Willems [Tue, 11 Apr 2023 20:06:09 +0000 (22:06 +0200)]
scalebutton: fix CSS name in documentation
Matthias Clasen [Mon, 10 Apr 2023 04:22:20 +0000 (00:22 -0400)]
scrolledwindow: Avoid a critical
When setting the child property to NULL, we also need
to unset auto_added_viewport, to avoid triggering a
critical when setting it again.
Matthias Clasen [Sun, 9 Apr 2023 11:32:25 +0000 (07:32 -0400)]
gtk-demo: Add a keyword
Make the demo using the 'bluroverlay' come up when you type 'blur'.
Matthias Clasen [Sun, 9 Apr 2023 12:33:15 +0000 (08:33 -0400)]
gesture stylus: Fix condition
Now that the paint demo lets us test this, it has
become apparent that this condition is wrong, and
we don't get the expected events if stylus-only is
FALSE.
Matthias Clasen [Sun, 9 Apr 2023 12:28:26 +0000 (08:28 -0400)]
gtk-demo: Work without stylus
In the paint demo, don't assume that the event
backlog contains pressure. It won't, if we are
working with a plain old mouse.
Matthias Clasen [Sun, 9 Apr 2023 12:13:46 +0000 (08:13 -0400)]
gtk-demo: Test stylus-only mode
Add a checkbutton to toggle the stylus-only
mode of GtkGestureStylus, so we can test this.
Matthias Clasen [Sat, 8 Apr 2023 23:50:16 +0000 (19:50 -0400)]
range: Fix a copy-paste error
This was showing up as the alpha popup in
the color editor not being positioned correctly.
Matthias Clasen [Fri, 7 Apr 2023 21:44:27 +0000 (17:44 -0400)]
gestureclick: Use drag threshold for updates
Matthias Clasen [Thu, 6 Apr 2023 19:31:03 +0000 (15:31 -0400)]
gestureclick: Don't use threshold for touch
When determining double-clicks, don't use the distance
threshold for touch events. It is very hard to double
touch reliably within a few pixels of the same position.
Fixes: #5580
Carlos Garnacho [Fri, 7 Apr 2023 19:42:10 +0000 (21:42 +0200)]
gtkpopover: Move GTK grabs to map/unmap
Typically, a popover gets mapped when shown and unmapped when
hidden. A situation there that breaks is where the popover gets
recursively unmapped/unrealized when its root is destroyed.
In that situation, the popover does however unmap (without being
hidden first), moving the GTK grab from show/hide to map/unmap
will handle the previous situations, plus this one.
Fixes things being unclickable if e.g. a modal dialog got a
popover popped up, then got closed via Alt-F4.
Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/5730
Matthias Clasen [Fri, 7 Apr 2023 17:14:51 +0000 (13:14 -0400)]
inspector: Redo the actions list
Make the actions list implement GtkActionObserver
for the muxer case, and make updates work.
Matthias Clasen [Fri, 7 Apr 2023 16:58:10 +0000 (12:58 -0400)]
inspector: Simplify the action editor
No need to listen for changes, the actions list
code will do so and tell us to update.
Matthias Clasen [Fri, 7 Apr 2023 17:14:07 +0000 (13:14 -0400)]
inspector: Add ActionHolder::changed
We will use this signal to communicate
action changes to the action list widgetry.
Matthias Clasen [Fri, 7 Apr 2023 17:15:34 +0000 (13:15 -0400)]
inspector: Cosmetics
Make the variant editor use a checkbutton
instead of a togglebutton.
Matthias Clasen [Fri, 7 Apr 2023 16:53:57 +0000 (12:53 -0400)]
actionmuxer: Add a precondition
This helps with debugging the inspectors action
handling.
Matthias Clasen [Fri, 7 Apr 2023 13:16:21 +0000 (09:16 -0400)]
inspector: Be more careful
Tweak the variant-editor code to handle some
cases more explicitly.
Matthias Clasen [Fri, 7 Apr 2023 12:55:40 +0000 (08:55 -0400)]
inspector: Plug a memory leak
Matthias Clasen [Fri, 7 Apr 2023 12:52:51 +0000 (08:52 -0400)]
inspector: Be safer when handling actions
Those query apis are serious about not ignoring
their return value, and may not set their our
arguments to anything if they return FALSE.
Matthias Clasen [Fri, 7 Apr 2023 12:02:44 +0000 (08:02 -0400)]
actionmuxer: Make the compiler warn
Warn when the boolean return isn't used, since we
may not initialize the out arguments in the FALSE
case (see the previous commits).
Matthias Clasen [Fri, 7 Apr 2023 11:56:16 +0000 (07:56 -0400)]
textview: Handle a return value
Nelson Benítez León [Thu, 6 Apr 2023 22:45:59 +0000 (18:45 -0400)]
inspector: fix crash caused by uninitialized GVariant
we were not checking the return gboolean of
gtk_action_muxer_query_action() which was
returning FALSE for the crash case, meaning
it didn't set the passed in GVariant, but
we were still using it as it was non-null.
Fixes #5729
Maximiliano Sandoval R [Thu, 6 Apr 2023 10:10:11 +0000 (12:10 +0200)]
mediacontrols: Add tooltip text to play button
This makes the button accessible.
Lukáš Tyrychtr [Thu, 6 Apr 2023 11:55:16 +0000 (13:55 +0200)]
a11y: Map GTK_ACCESSIBLE_ROLE_ALERT_DIALOG to ATSPI_ROLE_ALERT
By doing this, alert dialogs will be read automatically, or at least
they should be, because a screen reader know that these are special.
Matthias Clasen [Mon, 3 Apr 2023 23:33:31 +0000 (19:33 -0400)]
expander: Fix the css docs
The docs were not matching reality since the
css node names were changed in
6d20fe0b.
Fixes: #5723
Matthias Clasen [Tue, 4 Apr 2023 02:19:39 +0000 (22:19 -0400)]
rendernodepaintable: Preserve aspect ratio in snapshot()
This is the better fix.
Matthias Clasen [Tue, 4 Apr 2023 02:32:31 +0000 (22:32 -0400)]
node-editor: Improve the scaling
We only want to scale the main rendering, not whats
shown in the sidebar. Also, make the scale logarithmic.
Benjamin Otte [Sun, 2 Apr 2023 12:06:11 +0000 (14:06 +0200)]
tooltipwindow: Cast the correct object
the tooltipwindow is in the userdata.
Cam Cook [Sun, 2 Apr 2023 17:12:21 +0000 (13:12 -0400)]
Documentation corrections for GtkTextIter
| method | current | suggestion |
|------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------|-----------------------------------------------------------------|
| [backward_visible_cursor_position](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3785) | "Moves @iter forward to the previous visible cursor position" | "Moves @iter backward to the previous visible cursor position." |
| [get_offset](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L595) | "Use [method@Gtk,TextBuffer.get_iter_at_offset]" | "Use [method@Gtk.TextBuffer.get_iter_at_offset]" |
| [starts_tag](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L1201) | "returns %TRUE, [method@Gtk.TextIter.has_tag" | "returns %TRUE, [method@Gtk.TextIter.has_tag] " |
| method | current | suggestion |
|--------------------------------------------------------------------------------------------------------|-----------------------------------------------------|-----------------------------------------------------------|
| [backward_cursor_position](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3715) | "Like gtk_text_iter_forward_cursor_position()" | "Like [method@Gtk.TextIter.forward_cursor_position]" |
| [backward_find_char](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L4483) | "Same as gtk_text_iter_forward_find_char()" | "Same as [method@Gtk.TextIter.forward_find_char]" |
| [backward_search](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L5295) | "Same as gtk_text_iter_forward_search()" | "Same as [method@Gtk.TextIter.forward_search]" |
| [backward_sentence_starts](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3611) | "Calls gtk_text_iter_backward_sentence_start()" | "Calls [method@Gtk.TextIter.backward_sentence_start]" |
| [backward_visible_word_starts](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3421) | "Calls gtk_text_iter_backward_visible_word_start()" | "Calls [method@Gtk.TextIter.backward_visible_word_start]" |
| [backward_word_starts](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3345) | "Calls gtk_text_iter_backward_word_start()" | "Calls [method@Gtk.TextIter.backward_word_start]" |
| [forward_sentence_ends](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3591) | "Calls gtk_text_iter_forward_sentence_end()" | "Calls [method@Gtk.TextIter.forward_sentence_end]" |
| [forward_to_end](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L4131) | "gtk_text_iter_get_char() called on" | "[method@Gtk.TextIter.get_char] called on" |
| [forward_visible_word_ends](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3403) | "Calls gtk_text_iter_forward_visible_word_end()" | "Calls [method@Gtk.TextIter.forward_visible_word_end]" |
| [forward_word_ends](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3327) | "Calls gtk_text_iter_forward_word_end()" | " Calls [method@Gtk.TextIter.forward_word_end]" |
| [is_end](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L1664) | "gtk_text_iter_is_end() is the most efficient" | "[method@Gtk.TextIter.is_end] is the most efficient" |
| [set_line_index](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3900) | "Same as gtk_text_iter_set_line_offset()" | "Same as [method@Gtk.TextIter.set_line_offset]" |
| [set_visible_line_index](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3987) | "Like gtk_text_iter_set_line_index()" | "Like [method@Gtk.TextIter.set_line_index]" |
| [set_visible_line_offset](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3946) | "Like gtk_text_iter_set_line_offset()" | "Like [method@Gtk.TextIter.set_line_offset]" |
Cam Cook [Sun, 2 Apr 2023 16:51:29 +0000 (12:51 -0400)]
Documentation corrections for GtkTextIter
| method | current | suggestion |
|------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------|-----------------------------------------------------------------|
| [backward_visible_cursor_position](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3785) | "Moves @iter forward to the previous visible cursor position" | "Moves @iter backward to the previous visible cursor position." |
| [get_offset](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L595) | "Use [method@Gtk,TextBuffer.get_iter_at_offset]" | "Use [method@Gtk.TextBuffer.get_iter_at_offset]" |
| [starts_tag](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L1201) | "returns %TRUE, [method@Gtk.TextIter.has_tag" | "returns %TRUE, [method@Gtk.TextIter.has_tag] " |
| method | current | suggestion |
|--------------------------------------------------------------------------------------------------------|-----------------------------------------------------|-----------------------------------------------------------|
| [backward_cursor_position](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3715) | "Like gtk_text_iter_forward_cursor_position()" | "Like [method@Gtk.TextIter.forward_cursor_position]" |
| [backward_find_char](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L4483) | "Same as gtk_text_iter_forward_find_char()" | "Same as [method@Gtk.TextIter.forward_find_char]" |
| [backward_search](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L5295) | "Same as gtk_text_iter_forward_search()" | "Same as [method@Gtk.TextIter.forward_search]" |
| [backward_sentence_starts](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3611) | "Calls gtk_text_iter_backward_sentence_start()" | "Calls [method@Gtk.TextIter.backward_sentence_start]" |
| [backward_visible_word_starts](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3421) | "Calls gtk_text_iter_backward_visible_word_start()" | "Calls [method@Gtk.TextIter.backward_visible_word_start]" |
| [backward_word_starts](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3345) | "Calls gtk_text_iter_backward_word_start()" | "Calls [method@Gtk.TextIter.backward_word_start]" |
| [forward_sentence_ends](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3591) | "Calls gtk_text_iter_forward_sentence_end()" | "Calls [method@Gtk.TextIter.forward_sentence_end]" |
| [forward_to_end](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L4131) | "gtk_text_iter_get_char() called on" | "[method@Gtk.TextIter.get_char] called on" |
| [forward_visible_word_ends](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3403) | "Calls gtk_text_iter_forward_visible_word_end()" | "Calls [method@Gtk.TextIter.forward_visible_word_end]" |
| [forward_word_ends](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3327) | "Calls gtk_text_iter_forward_word_end()" | " Calls [method@Gtk.TextIter.forward_word_end]" |
| [is_end](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L1664) | "gtk_text_iter_is_end() is the most efficient" | "[method@Gtk.TextBuffer.is_end] is the most efficient" |
| [set_line_index](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3900) | "Same as gtk_text_iter_set_line_offset()" | "Same as [method@Gtk.TextBuffer.set_line_offset]" |
| [set_visible_line_index](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3987) | "Like gtk_text_iter_set_line_index()" | "Like [method@Gtk.TextBuffer.set_line_index]" |
| [set_visible_line_offset](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3946) | "Like gtk_text_iter_set_line_offset()" | "Like [method@Gtk.TextBuffer.set_line_offset]" |
Matthias Clasen [Sat, 1 Apr 2023 18:18:27 +0000 (14:18 -0400)]
inspector: Update some misc info rows
Georges Basile Stavracas Neto [Sat, 1 Apr 2023 14:38:22 +0000 (11:38 -0300)]
gsk/gl/renderjob: Decompose matrix for 3D transforms
While this can be more expensive, it's also correct.
Matthias Clasen [Sat, 1 Apr 2023 13:45:58 +0000 (09:45 -0400)]
inspector: Improve display of paths
The values in the path section are long and generally
ellipsized. It does not make sense to reserve extra
space that the labels don't need.
Bilal Elmoussaoui [Sat, 1 Apr 2023 12:06:11 +0000 (12:06 +0000)]
docs: Improve GtkLabel rendering
By adding some missing links & avoid the browser
from rendering the entities as their equivalent symbols
Matthias Clasen [Thu, 30 Mar 2023 18:12:54 +0000 (14:12 -0400)]
listitem: Fix a notification problem
We were notifying ::item when ::child is
changed. Oops
Lukáš Tyrychtr [Tue, 28 Mar 2023 13:07:03 +0000 (15:07 +0200)]
a11y: Set ATSPI_STATE_SHOWING for all widgets, not only for windows
According to the at-spi2 docs, for a widget to be considered visible,
it needs both the showing and visible states. Many applications rely on that,
for example the flat review functionality of Orca.
this fixes #5194
Emmanuele Bassi [Sun, 26 Mar 2023 14:48:44 +0000 (15:48 +0100)]
Remove wrong annotation for GdkToplevel::compute-size
The size argument is passed to the signal by the GDK surface machinery,
as is: it's not going to be allocated by the caller (since it's a
signal), and it's not an out argument.
Matthias Clasen [Fri, 24 Mar 2023 19:30:27 +0000 (15:30 -0400)]
magnifier: Correct position of area
The widget paintable uses the widgets bounds
as intrinsic size, so we need to offset from
that to the allocation, which is what the
coordinates are relative to.
Matthias Clasen [Fri, 24 Mar 2023 18:49:18 +0000 (14:49 -0400)]
texthandle: Correct placement of handles
Text handles had the same problem as popovers.
They were interpreting their pointing-to rectangle
relative to the widgets bounds, when it is meant
to be relative to the widgtets allocation.
While we touch this code, rewrite it to use
gtk_widget_compute_point.
Matthias Clasen [Fri, 24 Mar 2023 18:47:27 +0000 (14:47 -0400)]
popover: Correct placement of popovers
When we don't have a pointing-to rectangle, we want to place
the popover wrt to the parents bounds. But if we have a
pointing-to rectangle, it is relative to the widgets allocation,
which is different from the bounds.
We were not handling the second case correctly, leading to context
menus in the text view being mispositioned by the widgets CSS padding.
While we are touching this code, rewrite it to handle transforms.
Fixes: #5695
Matthias Clasen [Fri, 24 Mar 2023 13:42:25 +0000 (09:42 -0400)]
docs: Improve markup for keys
Consistently use <kbd>x</kbd> to render keys in the docs
and use + for key combinations.
Matthias Clasen [Fri, 24 Mar 2023 12:56:06 +0000 (08:56 -0400)]
docs: Some updates
Fix some links ot point to docs.gtk.org.
Marco Trevisan (Treviño) [Fri, 24 Mar 2023 02:29:53 +0000 (03:29 +0100)]
gtkwidget: Do a type-check in gtk_widget_in_destruction()
Given it can be called during a widget destruction, it's safer to do a
type-check before crashing.
See: https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/1727
Caolán McNamara [Tue, 21 Mar 2023 15:04:12 +0000 (15:04 +0000)]
fix crash with gtk_accessible_role_to_name and GTK_ACCESSIBLE_ROLE_TOGGLE_BUTTON
presumably since:
commit
de80f503e4db282a7343aa16d2803967d4179739
Date: Thu Feb 23 14:22:20 2023 +0100
a11y: Introduce a dedicated role for toggle buttons
Benjamin Otte [Tue, 21 Mar 2023 13:06:33 +0000 (14:06 +0100)]
checkbutton: Only andle arrow focus if we're in a group
If there is no other widget in the group that we can focus, don't focus
and activate ourselves.
Otherwise the arrow keys on checkbuttons toggle the checkbutton.
Marco Trevisan (Treviño) [Mon, 20 Mar 2023 22:38:35 +0000 (23:38 +0100)]
theme: Use 0.5 opacity for disabled pictures
If a GtkImage is using an icon we use a gtk-icon-filter to se the icon
opacity when in insensitive state, however when using other kinds of
pictures we do not apply the same style leading to an inconsistent
result.
Closes: #5683
Matthias Clasen [Wed, 19 Apr 2023 07:19:12 +0000 (09:19 +0200)]
gsk: Use explicit switches
This makes it harder to forget to add new
node types here.
Matthias Clasen [Wed, 19 Apr 2023 06:13:55 +0000 (08:13 +0200)]
gsk: Mask nodes support 2d transforms
When adding mask nodes, I overlooked that
we have two separate functions for determining
what transforms a node supports without offlines.
Since we claim that mask nodes support general
transform, they must certainly support 2d transforms
as well.
Matthias Clasen [Sat, 18 Mar 2023 03:35:45 +0000 (23:35 -0400)]
Stop binding textdomain for -properties
We don't have these translations anymore.
Matthias Clasen [Fri, 17 Mar 2023 15:48:44 +0000 (11:48 -0400)]
gtk-demo: Reset properties when the image changes
Matthias Clasen [Fri, 17 Mar 2023 14:59:05 +0000 (10:59 -0400)]
broadway: Don't cause traffic when disconnecting
The recently added transient-for support was causing
roundtrips when a client with transients disconnects,
leading to assertion failures. Avoid that.
Matthias Clasen [Fri, 17 Mar 2023 12:56:23 +0000 (08:56 -0400)]
docs: Update broadway docs
Using Broadway without broadwayd hasn't worked since 2013...
Fixes: #5662
Benjamin Otte [Thu, 16 Mar 2023 22:36:00 +0000 (23:36 +0100)]
gldriver: Quick workaround for filter mismatch
We should really use texture views or samplers to handle this case for
shared textures, but this at least makes NEAREST not break.
Matthias Clasen [Thu, 16 Mar 2023 20:06:49 +0000 (16:06 -0400)]
label: Use GtkFileLauncher for file URI
The GtkUriLauncher calls into the openuri portal, which distinguishes
between files, directories, and URI. The GtkFileLauncher contains logic
to deal with this, because it can already handle the file and folder
differences.
If we have a file:// URI it's easier to create a GFile out of it, and
use the GtkFileLauncher API, while leaving the GtkUriLauncher API for
every other URI scheme.
Same fix as
de3c1d0c73987225869908, for GtkLabel.
Fixes: #5671
Emmanuele Bassi [Thu, 16 Mar 2023 12:09:55 +0000 (12:09 +0000)]
linkbutton: Use GtkFileLauncher for file URI
The GtkUriLauncher calls into the openuri portal, which distinguishes
between files, directories, and URI. The GtkFileLauncher contains logic
to deal with this, because it can already handle the file and folder
differences.
If we have a file:// URI it's easier to create a GFile out of it, and
use the GtkFileLauncher API, while leaving the GtkUriLauncher API for
every other URI scheme.
Fixes: #5671
Alexander Mikhaylenko [Thu, 9 Jun 2022 18:42:45 +0000 (22:42 +0400)]
theme: Port .boxed-list style from libadwaita
Consistently use it for boxed lists in inspector and gtk-demo.
Fixes issues like https://gitlab.gnome.org/GNOME/gtk/-/issues/3145
Matthias Clasen [Fri, 21 Apr 2023 05:55:14 +0000 (05:55 +0000)]
Merge branch 'fix-410-tests' into 'gtk-4-10'
testsuite: Fix broken test
See merge request GNOME/gtk!5855
Matthias Clasen [Fri, 21 Apr 2023 05:42:51 +0000 (05:42 +0000)]
Merge branch 'cherry-pick-
03b71a97' into 'gtk-4-10'
Merge branch 'wip/otte/for-main' into 'main'
See merge request GNOME/gtk!5854
Benjamin Otte [Wed, 29 Mar 2023 01:52:44 +0000 (03:52 +0200)]
testsuite: Fix broken test
The test was referencing a nonexisting image.
Plus, node parsing cannot reference relative URLs.
Benjamin Otte [Thu, 20 Apr 2023 21:50:44 +0000 (21:50 +0000)]
Merge branch 'wip/otte/for-main' into 'main'
testsuite: Be less verbose in accessor-apis test
Closes #5763
See merge request GNOME/gtk!5851
(cherry picked from commit
03b71a97599bedcc4203b6d12cdce88131167b99)
be5f2250 testsuite: Be less verbose in accessor-apis test
39583e40 testsuite: Allow accessors in interfaces
e47c0760 adjustment: Split out a function
75c47755 adjustment: sanity-check values when setting them
f393f70e listbase: Don't warn on scroll in empty list
Sabri Ünal [Wed, 19 Apr 2023 12:59:55 +0000 (12:59 +0000)]
Update Turkish translation
Matthias Clasen [Tue, 11 Apr 2023 06:02:23 +0000 (06:02 +0000)]
Merge branch 'cherry-pick-
faac2f78' into 'gtk-4-10'
filesystemmodel: Notify correct position removed in remove_file()
See merge request GNOME/gtk!5816
Corey Berla [Mon, 10 Apr 2023 19:56:08 +0000 (12:56 -0700)]
filesystemmodel: Notify correct position removed in remove_file()
32247bc50e63b709ae738a95a2ec71345b5fad75 made several changes to account for the
fact that we no longer have a NULL editable at the beginning of the list
model. The commit mistakenly left out one change in remove_file(),
which causes the wrong file to be removed.
(cherry picked from commit
faac2f7894608eef7e3884897b6a38da854e0fa8)
Alexander Shopov [Fri, 7 Apr 2023 16:26:55 +0000 (16:26 +0000)]
Update Bulgarian translation
Matthias Clasen [Sat, 1 Apr 2023 12:48:49 +0000 (12:48 +0000)]
Merge branch 'cherry-pick-
515f39f1' into 'gtk-4-10'
Merge branch 'wip/otte/for-main' into 'main'
See merge request GNOME/gtk!5760
Matthias Clasen [Sat, 1 Apr 2023 01:23:44 +0000 (01:23 +0000)]
Merge branch 'cherry-picks-for-4-10' into 'gtk-4-10'
scrolledwindow: Disconnect the right handler
See merge request GNOME/gtk!5762
Benjamin Otte [Wed, 29 Mar 2023 00:28:01 +0000 (02:28 +0200)]
rendernodeparser: Emit error when failing to resolve URL
Benjamin Otte [Tue, 28 Mar 2023 19:09:01 +0000 (21:09 +0200)]
rendernodeparser: Failing to parse a string is an error
Testcase included.
Matthias Clasen [Sun, 26 Mar 2023 13:47:46 +0000 (09:47 -0400)]
wayland: Comply with protocol requirements
If you send a bad anchor rect to mutter, it crashes.
Thats not great, so lets not do that.
Matthias Clasen [Tue, 28 Mar 2023 01:56:41 +0000 (21:56 -0400)]
gdk: Avoid a pointless indirection
Don't use g_fprintf if GLib is using system printf
anyway.
Matthias Clasen [Tue, 28 Mar 2023 01:44:56 +0000 (21:44 -0400)]
Improve an error message
We were producing a misleading error message
when gtk_init() fails.
Fixes: #5704
Matthias Clasen [Tue, 28 Mar 2023 01:32:19 +0000 (21:32 -0400)]
gdk: Improve logging for backends
Log more when trying backends.
Benjamin Otte [Sat, 25 Mar 2023 22:57:17 +0000 (23:57 +0100)]
enums: Move G_END_DECLS to the end of the file
Bilal Elmoussaoui [Mon, 27 Mar 2023 19:19:06 +0000 (21:19 +0200)]
docs: Fix various broken links
Jonas Ådahl [Mon, 27 Mar 2023 19:27:44 +0000 (21:27 +0200)]
wayland/popup: Handle late received reposition feedback
If we map, reposition, unmap, remap, the reposition feedback from the
last time a popup was mapped might be received while we're dealing with
the new version of the popup. At this point, the old reposition token
has no meating, so lets drop it. Also reset the reposition tokens when
creating new protocol objects, so that the reposition token are as if
we're in the initial state.
This fixes an issue where we'd get stuck if repeatedly smashing a button
that'd create popups that'd immediately get dismissed by the compositor.
Ludovico de Nittis [Mon, 27 Mar 2023 09:53:57 +0000 (11:53 +0200)]
wayland: Try to open the display even if XDG_RUNTIME_DIR is unset
Since Wayland 1.15, it is now possible to use absolute paths in
"WAYLAND_DISPLAY".
In that scenario, having a valid "XDG_RUNTIME_DIR" is not a requirement
anymore.
For this reason we remove the "XDG_RUNTIME_DIR" check and we let
`wl_display_connect()` decide if our environment is correct.
Signed-off-by: Ludovico de Nittis <ludovico.denittis@collabora.com>
Benjamin Otte [Mon, 27 Mar 2023 04:23:35 +0000 (06:23 +0200)]
magnifier: Don't check for visibility
gtk_widget_queue_draw() already does that.
Matthias Clasen [Sun, 26 Mar 2023 14:55:08 +0000 (10:55 -0400)]
scrolledwindow: Disconnect the right handler
We connect gtk_scrolled_window_update_use_indicators
as signal handler in realize(), but we were disconnecting
gtk_scrolled_window_sync_use_indicators in unrealize.
Spotted by Milan Crha.
Fixes: #5684
Benjamin Otte [Fri, 31 Mar 2023 15:58:03 +0000 (15:58 +0000)]
Merge branch 'wip/otte/for-main' into 'main'
various fixes
See merge request GNOME/gtk!5756
(cherry picked from commit
515f39f161d73e4e58fcb58ed330db11c3bc8642)
6f417534 widget: Shortcut widget not repositioning
dbff49b5 listbase: Clear any newly set adjustments
Alexander Shopov [Fri, 31 Mar 2023 10:04:26 +0000 (10:04 +0000)]
Update Bulgarian translation
Марко Костић [Wed, 29 Mar 2023 11:28:23 +0000 (11:28 +0000)]
Update Serbian translation