gtk4.git
2 years agogsk: Cosmetics
Matthias Clasen [Sun, 2 Apr 2023 02:54:19 +0000 (22:54 -0400)]
gsk: Cosmetics

Rename scale_factor to scale in various places,
now that it is no longer an int but a float.

2 years agogsk: Pass scale as float to the command queue
Matthias Clasen [Sun, 2 Apr 2023 02:48:38 +0000 (22:48 -0400)]
gsk: Pass scale as float to the command queue

2 years agoexamples: Update for deprecations
Matthias Clasen [Sun, 2 Apr 2023 13:06:02 +0000 (09:06 -0400)]
examples: Update for deprecations

Stop using gdk_surface_create_similar_surface here.

2 years agoMerge branch 'deprecate-similar-surface' into 'main'
Matthias Clasen [Sun, 2 Apr 2023 10:55:15 +0000 (10:55 +0000)]
Merge branch 'deprecate-similar-surface' into 'main'

popover: Stop using gdk_surface_create_similar_surface

See merge request GNOME/gtk!5771

2 years agoUpdate Ukrainian translation
Yuri Chornoivan [Sun, 2 Apr 2023 06:19:55 +0000 (06:19 +0000)]
Update Ukrainian translation

2 years agoDeprecate gdk_surface_create_similar_surface
Matthias Clasen [Sun, 2 Apr 2023 03:09:19 +0000 (23:09 -0400)]
Deprecate gdk_surface_create_similar_surface

This function is part of the cairo drawing API and
we are moving away from that. Update all callers.

2 years agopopover: Stop using gdk_surface_create_similar_surface
Matthias Clasen [Sun, 2 Apr 2023 03:08:36 +0000 (23:08 -0400)]
popover: Stop using gdk_surface_create_similar_surface

Just create the cairo image surface ourselves.

2 years agoMerge branch 'inspector-fractional-scale' into 'main'
Matthias Clasen [Sat, 1 Apr 2023 23:31:39 +0000 (23:31 +0000)]
Merge branch 'inspector-fractional-scale' into 'main'

Add gdk_surface_get_scale

See merge request GNOME/gtk!5769

2 years agoinspector: Show surface scale
Matthias Clasen [Sat, 1 Apr 2023 18:09:23 +0000 (14:09 -0400)]
inspector: Show surface scale

For Wayland surfaces, show the fractional scale
if we have it.

2 years agoAdd gdk_surface_get_scale
Matthias Clasen [Sat, 1 Apr 2023 18:51:11 +0000 (14:51 -0400)]
Add gdk_surface_get_scale

Add a scale property to GdkSurface and use the
fractional scale for it on Wayland.

2 years agoMerge branch 'wip/otte/listitem-focus' into 'main'
Benjamin Otte [Sat, 1 Apr 2023 19:33:00 +0000 (19:33 +0000)]
Merge branch 'wip/otte/listitem-focus' into 'main'

GtkColumnView factories and focus rework

See merge request GNOME/gtk!5728

2 years agoinspector: Show the viewporter too
Matthias Clasen [Sat, 1 Apr 2023 17:02:53 +0000 (13:02 -0400)]
inspector: Show the viewporter too

2 years agogtk-demo: Port to GtkColumnViewCell
Benjamin Otte [Fri, 31 Mar 2023 12:17:44 +0000 (14:17 +0200)]
gtk-demo: Port to GtkColumnViewCell

2 years agofilechooserwidget: Port to ColumnViewCell
Benjamin Otte [Fri, 31 Mar 2023 12:05:57 +0000 (14:05 +0200)]
filechooserwidget: Port to ColumnViewCell

2 years agotestcolumnview: Port to GtkColumnViewCell
Benjamin Otte [Fri, 31 Mar 2023 11:24:59 +0000 (13:24 +0200)]
testcolumnview: Port to GtkColumnViewCell

2 years agocolumnview: Add GtkColumnViewCell
Benjamin Otte [Thu, 30 Mar 2023 11:18:15 +0000 (13:18 +0200)]
columnview: Add GtkColumnViewCell

This splits GtkListItem into 2 objects.

It is fully backwards compatible.

Using GtkListItem for GtkColumnView is now de-facto deprecated.

2 years agobuilderlistitemfactory: Allow subclasses
Benjamin Otte [Fri, 31 Mar 2023 11:10:27 +0000 (13:10 +0200)]
builderlistitemfactory: Allow subclasses

It's going to be used with the new GtkColumnViewCell objects, so that
it's backwards compatible with ui file factories that use GtkListItem.

2 years agobuilder: Allow template parsing to be used with subclasses
Benjamin Otte [Fri, 31 Mar 2023 11:01:47 +0000 (13:01 +0200)]
builder: Allow template parsing to be used with subclasses

Whenn setting gtk_builder_set_allow_template_parents(), the builder
instance will accept
  <template class="GtkWidget">
for a GtkBox instance.

It's going to be used with the new GtkColumnViewCell objects, so that
it's backwards compatible with ui file factories that use GtkListItem.

2 years agocolumnviewcell: Ignore ::activatable and ::selectable for cells
Benjamin Otte [Thu, 30 Mar 2023 10:26:01 +0000 (12:26 +0200)]
columnviewcell: Ignore ::activatable and ::selectable for cells

This is a row property, not a cell property.

2 years agocolumnviewcellwidget: Untangle from GtkListItemWidget
Benjamin Otte [Thu, 30 Mar 2023 09:40:05 +0000 (11:40 +0200)]
columnviewcellwidget: Untangle from GtkListItemWidget

This is step 1 in switching cells to their own ListItem subclass.

2 years agotestdatatable: Add a --pages option
Benjamin Otte [Thu, 30 Mar 2023 05:43:12 +0000 (07:43 +0200)]
testdatatable: Add a --pages option

That way, local scrolling is available and the scrolling isn't random.

Recycling should now involve reordering the recycled widgets instead of
just keeping their order because all of them got recycled.

2 years agocolumnviewcellwidget: Ensure for_size is large enough
Benjamin Otte [Thu, 30 Mar 2023 06:51:19 +0000 (08:51 +0200)]
columnviewcellwidget: Ensure for_size is large enough

When clipping, we still need to do proper size requests.

2 years agocolumnviewcellwidget: Rewrite width unadjusting
Benjamin Otte [Thu, 30 Mar 2023 04:58:40 +0000 (06:58 +0200)]
columnviewcellwidget: Rewrite width unadjusting

Use GtkCssBoxes for that purpose. No more scary CSS math necessary in
the widget.

2 years agofilechooser: Set a row-factory
Benjamin Otte [Wed, 29 Mar 2023 08:39:11 +0000 (10:39 +0200)]
filechooser: Set a row-factory

This way, we can toggle per-row selectability and ensure files are not
selectable in select-folder mode.

2 years agocolumnview: Add gtk_column_view_add_row_factory()
Benjamin Otte [Wed, 29 Mar 2023 08:36:18 +0000 (10:36 +0200)]
columnview: Add gtk_column_view_add_row_factory()

This allows setting a factory to toggle per-row properties.

Implemented are selectable, focusable and activatable.
These are meant to supercede the per-cell selectable and activatable
properties, which make no sense individually.

The focus property makes it possible to focus rows instead of cells,
which is the default behavior.

2 years agocolumnview: Implement inertness
Benjamin Otte [Wed, 29 Mar 2023 08:33:51 +0000 (10:33 +0200)]
columnview: Implement inertness

This properly implements the same behavior as
62e9d1e470b0819bdcb4d2a3ba05e083306fc0da and avoids randomly losing
factories.

Oops.

2 years agocolumnviewrowwidget: Don't discard items in unroot()
Benjamin Otte [Wed, 29 Mar 2023 06:34:40 +0000 (08:34 +0200)]
columnviewrowwidget: Don't discard items in unroot()

Follows 3411b0306ee3b88038abdc736adf60bd004c7b7a and
3fb10ff2d8cdffdc5e026f9b57c4d5580a36d308.

2 years agocolumnview: Rename to GtkColumnViewCellWidget
Benjamin Otte [Mon, 27 Mar 2023 18:53:48 +0000 (20:53 +0200)]
columnview: Rename to GtkColumnViewCellWidget

Just like with Row/RowWidget, I want to use Cell/CellWidget.

2 years agocolumnview: Add GtkColumnViewRow
Benjamin Otte [Mon, 27 Mar 2023 02:36:22 +0000 (04:36 +0200)]
columnview: Add GtkColumnViewRow

There is no way to set it yet, this is just to prove that it works.

It also changes the focus behavior of rows. They are now always
focusable - unless turned off by the factory once that is possible.

2 years agolistitem: Add a backwards compatibility workaround
Benjamin Otte [Sun, 26 Mar 2023 18:51:27 +0000 (20:51 +0200)]
listitem: Add a backwards compatibility workaround

I want to avoid turning the :focusable property into a tristate at all
costs, but that third state is what we had before the property.

2 years agotreeexpander: Add docs note about setting GtkListItem::focusable
Benjamin Otte [Sun, 26 Mar 2023 19:06:09 +0000 (21:06 +0200)]
treeexpander: Add docs note about setting GtkListItem::focusable

2 years agocolumnviewcell: Cells should not be focusable by default
Benjamin Otte [Mon, 27 Mar 2023 20:03:13 +0000 (22:03 +0200)]
columnviewcell: Cells should not be focusable by default

2 years agolistview: Add GtkListItem::focusable property
Benjamin Otte [Sat, 25 Mar 2023 23:50:45 +0000 (00:50 +0100)]
listview: Add GtkListItem::focusable property

This makes the question if a listitem can be focused or not an explicit
decision by application developers.

Previously an item could be focused if it was selectable and no child or
grandchild was focusable - so if you put a label and icon into it, the
item was focusable, but if you put a GtkTreeExpander or a GtkButton into
it, the item wasn't. This needs to be decided explicitly now.

Technically this is an API break, because the previous behavior does not
exist anymore.
But I really don't want to make this a tristate (focusable, not
focusable, automatic), because then binding it to other things gets
hard, and because all the other focusable proeprties are booleans, too,
and working with them gets a lot harder.

Related: #3910

2 years agocolumnviewcell: Cells aren't selectable or activatable
Benjamin Otte [Mon, 27 Mar 2023 20:04:14 +0000 (22:04 +0200)]
columnviewcell: Cells aren't selectable or activatable

Rows are.

2 years agolistitem: Use GDK_DECLARE_INTERNAL_TYPE
Benjamin Otte [Fri, 31 Mar 2023 21:42:15 +0000 (23:42 +0200)]
listitem: Use GDK_DECLARE_INTERNAL_TYPE

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Sat, 1 Apr 2023 18:36:39 +0000 (18:36 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

inspector: Update some misc info rows

See merge request GNOME/gtk!5768

2 years agoMerge branch 'wip/otte/fractional-cairo' into 'main'
Matthias Clasen [Sat, 1 Apr 2023 18:35:33 +0000 (18:35 +0000)]
Merge branch 'wip/otte/fractional-cairo' into 'main'

wayland: Enable fractional scaling with the Cairo renderer

See merge request GNOME/gtk!5767

2 years agoMerge branch 'gbsneto/mildly-mid-vulkan-fixes' into 'main'
Georges Basile Stavracas Neto [Sat, 1 Apr 2023 18:23:12 +0000 (18:23 +0000)]
Merge branch 'gbsneto/mildly-mid-vulkan-fixes' into 'main'

Vulkan transform / scale fixes

See merge request GNOME/gtk!5757

2 years agoinspector: Update some misc info rows
Matthias Clasen [Sat, 1 Apr 2023 18:18:27 +0000 (14:18 -0400)]
inspector: Update some misc info rows

2 years agowayland: Use fractional scaling with the Cairo renderer
Benjamin Otte [Sat, 1 Apr 2023 15:25:33 +0000 (17:25 +0200)]
wayland: Use fractional scaling with the Cairo renderer

Cairo can do that, so just enable it:

 * Create surfaces with the correct fractionally scaled size.
 * Set the Cairo surface's device scale to that number.

2 years agowayland: Allow creating fractional Cairo surfaces
Benjamin Otte [Sat, 1 Apr 2023 14:09:38 +0000 (16:09 +0200)]
wayland: Allow creating fractional Cairo surfaces

We don't do that yet, because the buffer scale code can't deal with it,
but we can do it now.

2 years agobuild: Bump wayland-protocols requirement
Benjamin Otte [Sat, 1 Apr 2023 11:59:52 +0000 (13:59 +0200)]
build: Bump wayland-protocols requirement

The new fractional-scale support requires v1.31

2 years agowayland: Use wp_viewport to set buffer scale
Benjamin Otte [Sat, 1 Apr 2023 12:41:30 +0000 (14:41 +0200)]
wayland: Use wp_viewport to set buffer scale

Instead of setting the buffer scale via the buffer-scale command, set it
via the viewport.

This technically allows setting fractional scales, but we're not doing
that.

2 years agogsk/gl/renderjob: Decompose matrix for 3D transforms
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.

2 years agogsk/vulkan/renderpass: Update scales from transform node
Georges Basile Stavracas Neto [Fri, 24 Mar 2023 01:30:12 +0000 (22:30 -0300)]
gsk/vulkan/renderpass: Update scales from transform node

Retrieve the scale from the transform node, and store it as long
as the transform node is being visited. This applies the proper
scale to text nodes.

2 years agogsk/vulkan/renderpass: Refactor scale
Georges Basile Stavracas Neto [Fri, 24 Mar 2023 01:26:14 +0000 (22:26 -0300)]
gsk/vulkan/renderpass: Refactor scale

Instead of tracking a single scale, track x and y scales separately.
Factor out gsk_vulkan_render_pass_new() into a private function that
receives both scales, and pass 'scale_factor' for both.

2 years agoNEWS: Updates
Matthias Clasen [Sat, 1 Apr 2023 14:29:25 +0000 (10:29 -0400)]
NEWS: Updates

2 years agowayland: Use GdkFractionalScale for surface scale
Benjamin Otte [Sat, 1 Apr 2023 11:40:14 +0000 (13:40 +0200)]
wayland: Use GdkFractionalScale for surface scale

We still always round it to integers when we read it, but we store it as a fraction.

So we could now use it for fractional scaling.

2 years agowayland: Introduce GdkFractionalScale type
Benjamin Otte [Sat, 1 Apr 2023 15:31:47 +0000 (17:31 +0200)]
wayland: Introduce GdkFractionalScale type

We want to use it later for various things, this just adds the
infrastructure we will need.

2 years agoMerge branch 'always_expose_showing' into 'main'
Matthias Clasen [Sat, 1 Apr 2023 14:41:42 +0000 (14:41 +0000)]
Merge branch 'always_expose_showing' into 'main'

a11y: Set ATSPI_STATE_SHOWING for all widgets, not only for windows

Closes #5194

See merge request GNOME/gtk!5738

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Sat, 1 Apr 2023 14:14:31 +0000 (14:14 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

inspector: Improve display of paths

See merge request GNOME/gtk!5766

2 years agoinspector: Improve display of paths
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.

2 years agoMerge branch 'wayland-details' into 'main'
Matthias Clasen [Sat, 1 Apr 2023 13:51:40 +0000 (13:51 +0000)]
Merge branch 'wayland-details' into 'main'

inspector: Show Wayland protocols

See merge request GNOME/gtk!5765

2 years agowayland: Some debug spew tweaks
Matthias Clasen [Sat, 1 Apr 2023 12:45:45 +0000 (08:45 -0400)]
wayland: Some debug spew tweaks

2 years agoinspector: Show Wayland protocols
Matthias Clasen [Sat, 1 Apr 2023 12:45:05 +0000 (08:45 -0400)]
inspector: Show Wayland protocols

This could be useful for somebody.

2 years agoMerge branch 'bilelmoussaoui-main-patch-24659' into 'main'
Matthias Clasen [Sat, 1 Apr 2023 12:48:19 +0000 (12:48 +0000)]
Merge branch 'bilelmoussaoui-main-patch-24659' into 'main'

docs: Improve GtkLabel rendering

See merge request GNOME/gtk!5764

2 years agoUpdate Dutch translation
Nathan Follens [Sat, 1 Apr 2023 12:29:11 +0000 (12:29 +0000)]
Update Dutch translation

2 years agodocs: Improve GtkLabel rendering
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

2 years agoMerge branch 'wip/otte/fractional-scale' into 'main'
Benjamin Otte [Sat, 1 Apr 2023 11:39:32 +0000 (11:39 +0000)]
Merge branch 'wip/otte/fractional-scale' into 'main'

wayland: Add support for the fractional scale protocol

See merge request GNOME/gtk!5763

2 years agowayland: Add support for the fractional scale protocol
Benjamin Otte [Sat, 1 Apr 2023 10:48:26 +0000 (12:48 +0200)]
wayland: Add support for the fractional scale protocol

April fools!

No, really.
The fractional scale protocol is just a way to track the surface scale,
but not a way to draw fractional content.
This commit uses it for that, so tht we don't rely on tracking outputs.

This also allows magnifiers etc to send us a larger (integer) scale if
they would like that, that is not represented by the outputs.

2 years agoMerge branch 'wip/otte/wayland-versions' into 'main'
Benjamin Otte [Sat, 1 Apr 2023 00:52:11 +0000 (00:52 +0000)]
Merge branch 'wip/otte/wayland-versions' into 'main'

wayland: Use proper get_version() functions

See merge request GNOME/gtk!5761

2 years agowayland: Use wl_seat_get_version()
Benjamin Otte [Sat, 1 Apr 2023 00:21:47 +0000 (02:21 +0200)]
wayland: Use wl_seat_get_version()

2 years agowayland: Use zwp_pointer_gestures_v1_get_version()
Benjamin Otte [Sat, 1 Apr 2023 00:06:43 +0000 (02:06 +0200)]
wayland: Use zwp_pointer_gestures_v1_get_version()

2 years agowayland: Use gtk_shell1_get_version()
Benjamin Otte [Sat, 1 Apr 2023 00:03:54 +0000 (02:03 +0200)]
wayland: Use gtk_shell1_get_version()

... or correct gtk_surface1_get_version() alternative.

2 years agowayland: Use wl_data_device_manager_get_version()
Benjamin Otte [Fri, 31 Mar 2023 23:57:25 +0000 (01:57 +0200)]
wayland: Use wl_data_device_manager_get_version()

2 years agowayland: Use zxdg_output_manager_v1_get_version()
Benjamin Otte [Fri, 31 Mar 2023 23:53:52 +0000 (01:53 +0200)]
wayland: Use zxdg_output_manager_v1_get_version()

2 years agowayland: Remove unused variable
Benjamin Otte [Fri, 31 Mar 2023 23:44:28 +0000 (01:44 +0200)]
wayland: Remove unused variable

Also, Wayland has get_version() functions, so if we ever need it, we can
use that.

2 years agowayland: Check correct interface
Benjamin Otte [Fri, 31 Mar 2023 23:39:47 +0000 (01:39 +0200)]
wayland: Check correct interface

buffer scale is a surface property, so check the version of the surface
interface, not the compositor one.

2 years agowayland: Use wl_compositor_get_version()
Benjamin Otte [Fri, 31 Mar 2023 23:28:46 +0000 (01:28 +0200)]
wayland: Use wl_compositor_get_version()

Wayland has functions to check versions, so use those.

2 years agowayland: Use proper macro
Benjamin Otte [Fri, 31 Mar 2023 23:18:38 +0000 (01:18 +0200)]
wayland: Use proper macro

Wayland has macros to check required versions. Use those instead of
custom ones.

2 years agoCODING-STYLE: Updates
Matthias Clasen [Sat, 1 Apr 2023 00:17:12 +0000 (20:17 -0400)]
CODING-STYLE: Updates

We switched to using #pragma once in headers,
document that.

2 years agoMerge branch 'pragma-once' into 'main'
Matthias Clasen [Fri, 31 Mar 2023 23:52:01 +0000 (23:52 +0000)]
Merge branch 'pragma-once' into 'main'

Convert headers to #pragma once

See merge request GNOME/gtk!5759

2 years agoConvert headers to #pragma once
Matthias Clasen [Fri, 31 Mar 2023 19:11:10 +0000 (15:11 -0400)]
Convert headers to #pragma once

The conversion was done by guard2one.

2 years agogsk/vulkan/renderpass: Factor out node implementations
Georges Basile Stavracas Neto [Fri, 31 Mar 2023 17:00:33 +0000 (14:00 -0300)]
gsk/vulkan/renderpass: Factor out node implementations

This is mostly a cosmetic change, and the goal is twofold:

 1. Make it easier to spot unimplemented render node types; and
 2. Prepare for a small rework

The implementation for each node now lives in specific functions,
like the GL renderer; unlike the GL renderer, however, we use a
node type vtable to map GskRenderNodeType → implementation. Render
node without an implementation map to NULL, and use the fallback
implementation. Render nodes that fail any check and return FALSE
also use fallback implementation.

2 years agoMerge branch 'wip/otte/for-main' into 'main'
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

2 years agolistbase: Clear any newly set adjustments
Benjamin Otte [Thu, 30 Mar 2023 06:29:32 +0000 (08:29 +0200)]
listbase: Clear any newly set adjustments

The scrolling code assumes the adjustment values are up to date or
it crashes and before we've run size_allocate() we haven't update them.

Fixes a crash in the gtk-demo scrollinfo that would set the adjustments
with random values (via ScrolledWindow.set_child()) and then scroll in a
tick callback right before the (first) size_allocate().

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 agoMerge branch 'gbsneto/easy-vulkan-fixes' into 'main'
Matthias Clasen [Fri, 31 Mar 2023 13:25:30 +0000 (13:25 +0000)]
Merge branch 'gbsneto/easy-vulkan-fixes' into 'main'

Easy Vulkan cleanups and fixes

See merge request GNOME/gtk!5753

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/vulkancontext: Accept Khronos validation layers
Georges Basile Stavracas Neto [Thu, 30 Mar 2023 20:09:24 +0000 (17:09 -0300)]
gdk/vulkancontext: Accept Khronos validation layers

The Lunarg validation layers seem to have been deprecated in favour
of the Khronos ones. There's no reason not to have both, to accept
loading both - simultaneously, even.

2 years agogsk/vulkanglyphcache: Cleanup maths
Georges Basile Stavracas Neto [Thu, 23 Mar 2023 02:45:09 +0000 (23:45 -0300)]
gsk/vulkanglyphcache: Cleanup maths

A trivial cleanup to match what the GL renderer does

2 years agovulkan/glyphcache: Add padding around ink rect
Georges Basile Stavracas Neto [Wed, 22 Mar 2023 01:06:04 +0000 (22:06 -0300)]
vulkan/glyphcache: Add padding around ink rect

This is what the GL renderer does, and it gets rid of the cutout
characters.

2 years agogdk/vulkancontext: Pass all painted rects
Georges Basile Stavracas Neto [Tue, 21 Mar 2023 19:16:17 +0000 (16:16 -0300)]
gdk/vulkancontext: Pass all painted rects

Instead of passing a single, potentially massive rectangle that is
just the extents of the damage rect, collect and pass all damage
rects individually.

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 agoa11y: Set ATSPI_STATE_SHOWING for all widgets, not only for windows
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

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