gtk4.git
2 years agowidget: Shortcut widget not repositioning
Benjamin Otte [Fri, 31 Mar 2023 15:34:15 +0000 (17:34 +0200)]
widget: Shortcut widget not repositioning

If a widget doesn't move positions during gtk_widget_reposition(),
detect it early.

This is especially beneficial in the inspector.

2 years agoUpdate Bulgarian translation
Alexander Shopov [Fri, 31 Mar 2023 10:04:26 +0000 (10:04 +0000)]
Update Bulgarian translation

(cherry picked from commit 3458ebf8c93f839cbf33caa48cf39ec112f292a2)

2 years agoMerge branch 'more-property-notification' into 'main'
Matthias Clasen [Fri, 31 Mar 2023 01:54:52 +0000 (01:54 +0000)]
Merge branch 'more-property-notification' into 'main'

filedialog: Make filters nullable

See merge request GNOME/gtk!5755

2 years agotestsuite: Check more property notification
Matthias Clasen [Fri, 31 Mar 2023 00:18:56 +0000 (20:18 -0400)]
testsuite: Check more property notification

Handle more value types.

2 years agoMake adjustment setters behave
Matthias Clasen [Fri, 31 Mar 2023 01:18:35 +0000 (21:18 -0400)]
Make adjustment setters behave

2 years agomodels: Fix up property notifications
Matthias Clasen [Fri, 31 Mar 2023 00:18:19 +0000 (20:18 -0400)]
models: Fix up property notifications

We were emitting redundant notifications
for the ::model property.

2 years agofiledialog: Make filters nullable
Matthias Clasen [Fri, 31 Mar 2023 00:17:28 +0000 (20:17 -0400)]
filedialog: Make filters nullable

It should be possible to reset a property
to its default value.

2 years agoMerge branch 'more-notify-tests' into 'main'
Matthias Clasen [Thu, 30 Mar 2023 23:34:48 +0000 (23:34 +0000)]
Merge branch 'more-notify-tests' into 'main'

testsuite: Clean up some exclusions

See merge request GNOME/gtk!5752

2 years agoMerge branch 'gbsneto/wayland-buffer-scale-creation' into 'main'
Benjamin Otte [Thu, 30 Mar 2023 21:59:45 +0000 (21:59 +0000)]
Merge branch 'gbsneto/wayland-buffer-scale-creation' into 'main'

gdk/wayland/surface: Track and apply buffer scale

See merge request GNOME/gtk!5751

2 years agoMake widget property setters behave
Matthias Clasen [Thu, 30 Mar 2023 21:32:38 +0000 (17:32 -0400)]
Make widget property setters behave

We want to allow setting a property to its
current value, while still having a precondition
for widget->parent being NULL otherwise.

2 years agogdk/wayland/surface: Track and apply buffer scale
Georges Basile Stavracas Neto [Tue, 21 Mar 2023 23:04:56 +0000 (20:04 -0300)]
gdk/wayland/surface: Track and apply buffer scale

Add a new flag to track whether buffer scale is dirty or not,
and centralize calling wl_surface_set_buffer_scale() in a single
place: gdk_wayland_surface_sync_buffer_scale().

gdk_wayland_surface_sync_buffer_scale() is only called by
gdk_wayland_surface_sync(), which itself is called by the GL,
Vulkan, and Cairo contexts, right before submitting a frame.
This ensure that each frame has an up-to-date buffer scale.

This mimics how opaque and input regions are tracked.

2 years agotestsuite: Check more property notification
Matthias Clasen [Thu, 30 Mar 2023 16:43:21 +0000 (12:43 -0400)]
testsuite: Check more property notification

We can easily check some object types
such as widgets.

2 years agotestsuite: Clean up some exclusions
Matthias Clasen [Thu, 30 Mar 2023 13:05:33 +0000 (09:05 -0400)]
testsuite: Clean up some exclusions

Drop some exclusions from the notify test.
The tests work fine for these objects.

2 years agolistitem: Fix a notification problem
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

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Thu, 30 Mar 2023 02:45:56 +0000 (02:45 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

emojichooser: Stop using gtk_widget_get_allocation

See merge request GNOME/gtk!5749

2 years agoemojichooser: Stop using gtk_widget_get_allocation
Matthias Clasen [Thu, 30 Mar 2023 01:13:59 +0000 (21:13 -0400)]
emojichooser: Stop using gtk_widget_get_allocation

Replace all uses with gtk_widget_compute_bounds.

2 years agoMerge branch 'fix-popover-positioning' into 'main'
Matthias Clasen [Wed, 29 Mar 2023 20:12:29 +0000 (20:12 +0000)]
Merge branch 'fix-popover-positioning' into 'main'

wayland: Fix corner cases in positioning

See merge request GNOME/gtk!5741

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Wed, 29 Mar 2023 12:05:58 +0000 (12:05 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

Add some more keysyms tests

See merge request GNOME/gtk!5745

2 years agoAdd some more keysyms tests
Matthias Clasen [Wed, 29 Mar 2023 01:04:10 +0000 (21:04 -0400)]
Add some more keysyms tests

Spot-check a few keypad symbols.

2 years agotestsuite: Update a test
Matthias Clasen [Wed, 29 Mar 2023 11:34:27 +0000 (07:34 -0400)]
testsuite: Update a test

cacecd2fb54025a changed a warning message that
some tests check for. Oops.

2 years agoMerge branch 'wip/otte/filechooser-fixes' into 'main'
Benjamin Otte [Wed, 29 Mar 2023 11:28:28 +0000 (11:28 +0000)]
Merge branch 'wip/otte/filechooser-fixes' into 'main'

filechooser fixes

See merge request GNOME/gtk!5746

2 years agoMerge branch 'wip/otte/node-naming' into 'main'
Benjamin Otte [Wed, 29 Mar 2023 11:28:15 +0000 (11:28 +0000)]
Merge branch 'wip/otte/node-naming' into 'main'

node format: Allow naming textures and nodes

See merge request GNOME/gtk!5740

2 years agofilechoosercell: Remove position property
Benjamin Otte [Wed, 29 Mar 2023 04:41:23 +0000 (06:41 +0200)]
filechoosercell: Remove position property

Instead, query the position from the listitem

2 years agofilechoosercell: Remove selected property
Benjamin Otte [Wed, 29 Mar 2023 04:28:04 +0000 (06:28 +0200)]
filechoosercell: Remove selected property

Instead, query the selected state from the listitem.

2 years agofilechooser: Select via action
Benjamin Otte [Wed, 29 Mar 2023 04:26:03 +0000 (06:26 +0200)]
filechooser: Select via action

Don't fudge around poking through the listview, trying to get a model
and selecting it directly. Instead, use the proper way and activate the
"listitem.select" action.

2 years agolistbase: Select via action
Benjamin Otte [Wed, 29 Mar 2023 04:01:26 +0000 (06:01 +0200)]
listbase: Select via action

Instead of directly calling select_item(), trigger the select-item
action of the focused child.

We do this convoluted calling into the widget because that way
GtkListItem::selectable gets respected, which is what one would expect.

Plus, this code is usually triggered via keybindings, and this way the
ListBase keybindings work identical to the ListItem keybindings.

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

2 years agodocs: Document additions to the node format
Benjamin Otte [Wed, 29 Mar 2023 00:38:17 +0000 (02:38 +0200)]
docs: Document additions to the node format

2 years agotestsuite: Add parsing tests for node and texture naming
Benjamin Otte [Tue, 28 Mar 2023 22:12:59 +0000 (00:12 +0200)]
testsuite: Add parsing tests for node and texture naming

2 years agorendernodeparser: Detect duplicates and print them by name
Benjamin Otte [Tue, 28 Mar 2023 21:47:49 +0000 (23:47 +0200)]
rendernodeparser: Detect duplicates and print them by name

If we encounter a node or texture the 1st time and they are going
to be used again, give them a name.

Then, when encountering them again, print them by name instead
of duplicating them.

2 years agorendernodeparser: Add support for reusing nodes
Benjamin Otte [Tue, 28 Mar 2023 21:58:50 +0000 (23:58 +0200)]
rendernodeparser: Add support for reusing nodes

We extend the syntax for nodes from:
  <node-type> { ... }
to
  <node-type> { ... }
  <node-type> <string> { ... }
  <string>;
where the first is the same as before, the 2nd defines a named node and
the last references a previously defined node.
Or to give an example:
  color "node" {
    bounds: 0 0 10 10;
    color: red;
  }
  transform {
    bounds: 20 0 10 10;
    child: "node";
  }
This will draw the red box twice, once at (0,0) and once at
(20,0).

The intended use for this is both shortening generated node files as
well as allowing to write tests that reuse nodes, in particular when
dealing with caches.

2 years agorendernodeparser: Add support for reusing textures
Benjamin Otte [Tue, 28 Mar 2023 19:54:26 +0000 (21:54 +0200)]
rendernodeparser: Add support for reusing textures

We extend the syntax for textures from just:
  <url>
to
  [<string>] <url>
  <string>
where the first defines a named texture while the second references a
texture.
Or to give an example:
  texture {
    bounds: 0 0 10 10;
    texture: "foo" url("foo.png");
  }
  texture {
    bounds: 20 0 10 10;
    texture: "foo";
  }
This will draw the texture "foo.png" twice, once at (0,0) and once at
(20,0).

The intended use for this is both shortening generated node files as
well as allowing to write tests that reuse textures, in particular when
mixing them in texture and texture-scale nodes.

2 years agorendernodeparser: Add a Context object
Benjamin Otte [Tue, 28 Mar 2023 19:18:46 +0000 (21:18 +0200)]
rendernodeparser: Add a Context object

... and pass it through all the parsing functions.

So far it's unused, this is just the plumbing.

2 years agorendernodeparser: Split out a function
Benjamin Otte [Tue, 28 Mar 2023 21:30:30 +0000 (23:30 +0200)]
rendernodeparser: Split out a function

This code was copy/pasted, so unify it.

2 years agorendernodeparser: Emit error when failing to resolve URL
Benjamin Otte [Wed, 29 Mar 2023 00:28:01 +0000 (02:28 +0200)]
rendernodeparser: Emit error when failing to resolve URL

2 years agorendernodeparser: Failing to parse a string is an error
Benjamin Otte [Tue, 28 Mar 2023 19:09:01 +0000 (21:09 +0200)]
rendernodeparser: Failing to parse a string is an error

Testcase included.

2 years agotestsuite: Fix broken test
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.

2 years agoAdd a test for splicing treelistmodel
Kévin Commaille [Tue, 28 Mar 2023 20:18:09 +0000 (22:18 +0200)]
Add a test for splicing treelistmodel

2 years agotreelistmodel: Don't add items in reverse
Benjamin Otte [Wed, 29 Mar 2023 00:56:47 +0000 (02:56 +0200)]
treelistmodel: Don't add items in reverse

This was broken since commit bf55685000fd744a26eec61c07fd8aa3d084d54c
where we started to track items.

Fixes #5707

2 years agowayland: Fix corner cases in positioning
Matthias Clasen [Wed, 29 Mar 2023 00:23:38 +0000 (20:23 -0400)]
wayland: Fix corner cases in positioning

We were not handling some cases correctly.
This was making the dropdown in the gtk-demo
image-scaling demo appear in the top left
corner.

2 years agoMerge branch 'wayland-popup-anchor' into 'main'
Matthias Clasen [Tue, 28 Mar 2023 15:36:34 +0000 (15:36 +0000)]
Merge branch 'wayland-popup-anchor' into 'main'

wayland: Comply with protocol requirements

See merge request GNOME/gtk!5723

2 years agoUpdate French translation
Alexandre Franke [Tue, 28 Mar 2023 10:25:01 +0000 (10:25 +0000)]
Update French translation

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Tue, 28 Mar 2023 10:19:31 +0000 (10:19 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

gdk: Improve logging for backends

Closes #5704

See merge request GNOME/gtk!5737

2 years agoMerge branch 'sumibi-yakitori/fix-texture-filter' into 'main'
Matthias Clasen [Tue, 28 Mar 2023 02:17:39 +0000 (02:17 +0000)]
Merge branch 'sumibi-yakitori/fix-texture-filter' into 'main'

glrenderer: Fix to prevent creation of GL_TEXTURE_MAG_FILTER filters with incorrect values

See merge request GNOME/gtk!5729

2 years agogdk: Avoid a pointless indirection
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.

2 years agodocs: Some tweaks
Matthias Clasen [Tue, 28 Mar 2023 01:55:36 +0000 (21:55 -0400)]
docs: Some tweaks

2 years agoImprove an error message
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
2 years agogdk: Improve logging for backends
Matthias Clasen [Tue, 28 Mar 2023 01:32:19 +0000 (21:32 -0400)]
gdk: Improve logging for backends

Log more when trying backends.

2 years agoMerge branch 'wip/otte/for-main' into 'main'
Benjamin Otte [Mon, 27 Mar 2023 22:28:07 +0000 (22:28 +0000)]
Merge branch 'wip/otte/for-main' into 'main'

clenaup

See merge request GNOME/gtk!5736

2 years agocolumnviewcell: Remove root/unroot stuff
Benjamin Otte [Mon, 27 Mar 2023 19:43:20 +0000 (21:43 +0200)]
columnviewcell: Remove root/unroot stuff

Instead, do that work on creation/dispose.

This is a followup to 3fb10ff2d8cdffdc5e026f9b57c4d5580a36d308.

2 years agocolumnviewcell: Remove "visible" property setting
Benjamin Otte [Mon, 27 Mar 2023 18:57:10 +0000 (20:57 +0200)]
columnviewcell: Remove "visible" property setting

Since 7ad693f865fc7ca36b63301ef261e3030f321d47 we only create cells for
visible rows and don't just toggle visibility.

This is a leftover from that change.

2 years agoenums: Move G_END_DECLS to the end of the file
Benjamin Otte [Sat, 25 Mar 2023 22:57:17 +0000 (23:57 +0100)]
enums: Move G_END_DECLS to the end of the file

2 years agoMerge branch 'bilelmoussaoui/gi-docs' into 'main'
Matthias Clasen [Mon, 27 Mar 2023 19:53:33 +0000 (19:53 +0000)]
Merge branch 'bilelmoussaoui/gi-docs' into 'main'

docs: Fix various broken links

See merge request GNOME/gtk!5734

2 years agoMerge branch 'wip/reset-repositioned-after-handling' into 'main'
Matthias Clasen [Mon, 27 Mar 2023 19:51:47 +0000 (19:51 +0000)]
Merge branch 'wip/reset-repositioned-after-handling' into 'main'

wayland/popup: Handle late received reposition feedback

See merge request GNOME/gtk!5735

2 years agodocs: Fix various broken links
Bilal Elmoussaoui [Mon, 27 Mar 2023 19:19:06 +0000 (21:19 +0200)]
docs: Fix various broken links

2 years agowayland/popup: Handle late received reposition feedback
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.

2 years agoMerge branch 'ebassi/compute-size-annotation' into 'main'
Emmanuele Bassi [Mon, 27 Mar 2023 11:43:34 +0000 (11:43 +0000)]
Merge branch 'ebassi/compute-size-annotation' into 'main'

Remove wrong annotation for GdkToplevel::compute-size

See merge request GNOME/gtk!5725

2 years agoMerge branch 'wayland_display' into 'main'
Matthias Clasen [Mon, 27 Mar 2023 11:38:14 +0000 (11:38 +0000)]
Merge branch 'wayland_display' into 'main'

wayland: Try to open the display even if XDG_RUNTIME_DIR is unset

See merge request GNOME/gtk!5732

2 years agowayland: Try to open the display even if XDG_RUNTIME_DIR is unset
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>
2 years agoMerge branch 'wip/otte/listview-inert' into 'main'
Benjamin Otte [Mon, 27 Mar 2023 05:48:12 +0000 (05:48 +0000)]
Merge branch 'wip/otte/listview-inert' into 'main'

listview: Add concept of inertness

See merge request GNOME/gtk!5731

2 years agogridview: Add concept of inertness
Benjamin Otte [Mon, 27 Mar 2023 05:03:38 +0000 (07:03 +0200)]
gridview: Add concept of inertness

An inert gridview is a gridview that does not use the factory. This
allows faster updates because no calls into user code need to happen.

A gridview is inert when either:
 - It is not rooted.
 - It is not visible.
 - No factory is set (that one is obvious)

The gridview does not need to be inert without a model, as that case is
handled by the item manager.

This should allow Nautilus to keep both the gridview and the columnview
around, and just gtk_widget_hide() the unused widget.

The code for now does not disable the item manager, as some
functionality of the item manager is required to allow setting scroll
positions and such.
But that is a place where more gains could be found if profiling showed
that was useful to do.

2 years agolistview: Add concept of inertness
Benjamin Otte [Mon, 27 Mar 2023 04:54:10 +0000 (06:54 +0200)]
listview: Add concept of inertness

An inert listview is a listview that does not use the factory. This
allows faster updates because no calls into user code need to happen.

A listview is inert when either:
 - It is not rooted.
 - It is not visible.
 - No factory is set (that one is obvious)

The listview does not need to be inert without a model, as that case is
handled by the item manager.

This should allow Nautilus to keep both the gridview and the columnview
around, and just gtk_widget_hide() the unused widget.

The code for now does not disable the item manager, as some
functionality of the item manager is required to allow setting scroll
positions and such.
But that is a place where more gains could be found if profiling showed
that was useful to do.

2 years agolistfactorywidget: Stop trying to be smart
Benjamin Otte [Mon, 27 Mar 2023 02:53:48 +0000 (04:53 +0200)]
listfactorywidget: Stop trying to be smart

The widget would teardown the factory on unroot to avoid unnecessary
work when it isn't shown.

However, recycling may reposition widgets, and repositioning widgets
does a unroot/root.

We don't want to recycle widgets then.

2 years agogtk-demo: Set tab behavior for settings demo
Benjamin Otte [Mon, 27 Mar 2023 04:53:29 +0000 (06:53 +0200)]
gtk-demo: Set tab behavior for settings demo

2 years agomagnifier: Don't check for visibility
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.

2 years agoglrenderer: Fix to prevent creation of GL_TEXTURE_MAG_FILTER filters with incorrect...
sumibi-yakitori [Sun, 26 Mar 2023 19:53:04 +0000 (04:53 +0900)]
glrenderer: Fix to prevent creation of GL_TEXTURE_MAG_FILTER filters with incorrect values

2 years agoMerge branch 'wip/otte/tab-behavior' into 'main'
Benjamin Otte [Sun, 26 Mar 2023 19:10:29 +0000 (19:10 +0000)]
Merge branch 'wip/otte/tab-behavior' into 'main'

listview: Add ::tab-behavior to list widgets

See merge request GNOME/gtk!5710

2 years agocolumnview: Add GtkColumnView::tab-behavior
Benjamin Otte [Fri, 24 Mar 2023 04:41:03 +0000 (05:41 +0100)]
columnview: Add GtkColumnView::tab-behavior

Also make sure that GTK_LIST_TAB_CELL works by implementing support for
it in the row widget.

2 years agogridview: Add GtkGridView::tab-behavior
Benjamin Otte [Fri, 24 Mar 2023 02:45:24 +0000 (03:45 +0100)]
gridview: Add GtkGridView::tab-behavior

2 years agolistview: Add GtkListView::tab-behavior
Benjamin Otte [Fri, 24 Mar 2023 02:00:02 +0000 (03:00 +0100)]
listview: Add GtkListView::tab-behavior

The implementation lives (as always) in GtkListBase.

This is a feature request from the Nautilus developers, who currently do
some hacks to emulate that behavior and it apparently only breaks
sometimes.

2 years agoMerge branch 'scrolled-window-signal-disconnnect' into 'main'
Matthias Clasen [Sun, 26 Mar 2023 15:15:49 +0000 (15:15 +0000)]
Merge branch 'scrolled-window-signal-disconnnect' into 'main'

scrolledwindow: Disconnect the right handler

Closes #5684

See merge request GNOME/gtk!5726

2 years agoscrolledwindow: Disconnect the right handler
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
2 years agoRemove wrong annotation from GdkDragSurface::compute-size
Emmanuele Bassi [Sun, 26 Mar 2023 14:50:22 +0000 (15:50 +0100)]
Remove wrong annotation from GdkDragSurface::compute-size

Just like GdkToplevel::compute-size, the size argument of the signal is
given to the handlers by GDK; it's not an out argument meant to be
allocated by the caller.

2 years agoRemove wrong annotation for GdkToplevel::compute-size
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.

2 years agoMerge branch 'wayland-startup-notification-crash' into 'main'
Matthias Clasen [Sun, 26 Mar 2023 14:36:57 +0000 (14:36 +0000)]
Merge branch 'wayland-startup-notification-crash' into 'main'

wayland: Don't crash without xdg_activation_v1

Closes #5701

See merge request GNOME/gtk!5724

2 years agowayland: Don't crash without xdg_activation_v1
Matthias Clasen [Sun, 26 Mar 2023 14:11:14 +0000 (10:11 -0400)]
wayland: Don't crash without xdg_activation_v1

If the compositor does not support this protocol,
we can't use it.

Fixes: #5701
2 years agowayland: Comply with protocol requirements
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.

2 years agoMerge branch 'wayland-cursor-size' into 'main'
Matthias Clasen [Sun, 26 Mar 2023 01:01:04 +0000 (01:01 +0000)]
Merge branch 'wayland-cursor-size' into 'main'

wayland: Don't crash on cursor size 0

Closes #5700

See merge request GNOME/gtk!5721

2 years agoMerge branch 'wip/otte/for-main' into 'main'
Benjamin Otte [Sun, 26 Mar 2023 00:26:31 +0000 (00:26 +0000)]
Merge branch 'wip/otte/for-main' into 'main'

popover: Fix typo

See merge request GNOME/gtk!5720

2 years agowayland: Don't crash on cursor size 0
Matthias Clasen [Sun, 26 Mar 2023 00:25:51 +0000 (20:25 -0400)]
wayland: Don't crash on cursor size 0

The cursor-theme-size setting is documented as
'0 means the default size'. Make it so by using
size 24 if we see a 0. Its better than crashing.

Fixes: #5700
2 years agogtk-demo: Rename dropdown demo
Benjamin Otte [Sun, 26 Mar 2023 00:01:29 +0000 (01:01 +0100)]
gtk-demo: Rename dropdown demo

It's the listview selections demo, so use that name.

2 years agogtk-demo: Rename image scaling demo to image_scaling
Benjamin Otte [Sat, 25 Mar 2023 23:53:20 +0000 (00:53 +0100)]
gtk-demo: Rename image scaling demo to image_scaling

This just means renaming the C file, but it makes --run=image_scaling
actually do what I'd expect.

2 years agopopover: Fix typo
Benjamin Otte [Sat, 25 Mar 2023 23:43:58 +0000 (00:43 +0100)]
popover: Fix typo

The typo causs gnome-shell to crah, which is somewhat suboptimal.

It was introduced in 1a9c7a4b1fb.

2 years agoMerge branch 'coordinate-docs' into 'main'
Matthias Clasen [Sat, 25 Mar 2023 21:21:00 +0000 (21:21 +0000)]
Merge branch 'coordinate-docs' into 'main'

docs: Add some cross references

See merge request GNOME/gtk!5719

2 years agoIncorporate review feedback
Matthias Clasen [Sat, 25 Mar 2023 20:22:45 +0000 (16:22 -0400)]
Incorporate review feedback

2 years agodocs: Use our own box model illustration
Matthias Clasen [Sat, 25 Mar 2023 20:16:34 +0000 (16:16 -0400)]
docs: Use our own box model illustration

This one has a dark mode too.

2 years agoTweak
Matthias Clasen [Sat, 25 Mar 2023 19:29:55 +0000 (15:29 -0400)]
Tweak

2 years agoTweak
Matthias Clasen [Sat, 25 Mar 2023 19:27:23 +0000 (15:27 -0400)]
Tweak

2 years agoMore review feedback
Matthias Clasen [Sat, 25 Mar 2023 19:26:33 +0000 (15:26 -0400)]
More review feedback

2 years agodocs: Add another cross reference
Matthias Clasen [Sat, 25 Mar 2023 19:06:19 +0000 (15:06 -0400)]
docs: Add another cross reference

Refer to the new coordinate system overview
from the GdkEvent docs.

2 years agodocs: Apply review feedback
Matthias Clasen [Sat, 25 Mar 2023 19:05:28 +0000 (15:05 -0400)]
docs: Apply review feedback

Clarify some points in the coordinate overview.

2 years agoDocs: Cosmetics
Matthias Clasen [Sat, 25 Mar 2023 16:17:20 +0000 (12:17 -0400)]
Docs: Cosmetics

Align section heading better. Now they all follow
the "Using GTK..." pattern.

2 years agodocs: Add some cross references
Matthias Clasen [Sat, 25 Mar 2023 16:16:51 +0000 (12:16 -0400)]
docs: Add some cross references

Refer to the new coordinate system overview
from a couple of places where it is useful.

2 years agodocs: Add a section about coordinate systems
Matthias Clasen [Sat, 25 Mar 2023 16:10:58 +0000 (12:10 -0400)]
docs: Add a section about coordinate systems

2 years agoMerge branch 'deprecate-translate-coordinates' into 'main'
Matthias Clasen [Sat, 25 Mar 2023 14:33:14 +0000 (14:33 +0000)]
Merge branch 'deprecate-translate-coordinates' into 'main'

Deprecate gtk_widget_translate_coordinates

Closes #5697

See merge request GNOME/gtk!5717

2 years agoDrop gtk_widget_get_surface_allocation
Matthias Clasen [Sat, 25 Mar 2023 13:48:12 +0000 (09:48 -0400)]
Drop gtk_widget_get_surface_allocation

This private api is confusing, and no longer used.

2 years agoentrycompletion: Stop using gtk_widget_get_surface_allocation
Matthias Clasen [Sat, 25 Mar 2023 13:46:34 +0000 (09:46 -0400)]
entrycompletion: Stop using gtk_widget_get_surface_allocation

We only need the width of the widgets' bounds
here anyway, so just use gtk_widget_compute_bounds.

2 years agopopover: Stop using gtk_widget_get_surface_allocation
Matthias Clasen [Sat, 25 Mar 2023 13:45:31 +0000 (09:45 -0400)]
popover: Stop using gtk_widget_get_surface_allocation

The function is going away, and the computation
here was wrong anyway. Instead, add a helper that
properly computes the pointing-to rect in surface
coordinates and use it everywhere.

2 years agoDeprecate gtk_widget_translate_coordinates
Matthias Clasen [Sat, 25 Mar 2023 13:20:47 +0000 (09:20 -0400)]
Deprecate gtk_widget_translate_coordinates

Update all (non-deprecated) callers to use
gtk_widget_compute_point instead.

Fixes: #5697
2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Sat, 25 Mar 2023 13:59:06 +0000 (13:59 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

testsuite: Add some GL texture tests

See merge request GNOME/gtk!5715