gtk4.git
3 years agoMerge branch 'search-delay-versions' into 'main'
Emmanuele Bassi [Sat, 19 Mar 2022 10:14:04 +0000 (10:14 +0000)]
Merge branch 'search-delay-versions' into 'main'

Fix GtkSearchEntry:search-delay docs

See merge request GNOME/gtk!4585

3 years agoAdd version marker to GtkSearchEntry:search-delay property
Sebastian Dröge [Sat, 19 Mar 2022 09:56:05 +0000 (11:56 +0200)]
Add version marker to GtkSearchEntry:search-delay property

3 years agoFix typo in gtk_search_entry_set_search_delay() docs causing it to not show up
Sebastian Dröge [Sat, 19 Mar 2022 09:55:03 +0000 (11:55 +0200)]
Fix typo in gtk_search_entry_set_search_delay() docs causing it to not show up

3 years agoMerge branch 'macos-fix-scroll-unit-build' into 'main'
Matthias Clasen [Sat, 19 Mar 2022 03:57:48 +0000 (03:57 +0000)]
Merge branch 'macos-fix-scroll-unit-build' into 'main'

macos: fix scroll-unit build

See merge request GNOME/gtk!4584

3 years agomacos: fix scroll-unit build
panoplie [Sat, 19 Mar 2022 01:55:02 +0000 (02:55 +0100)]
macos: fix scroll-unit build

3 years agoMerge branch 'scroll-unit' into 'main'
Carlos Garnacho [Sat, 19 Mar 2022 00:47:08 +0000 (00:47 +0000)]
Merge branch 'scroll-unit' into 'main'

GdkScrollEvent: indicate the delta unit with a new GdkScrollUnit enum

See merge request GNOME/gtk!4508

3 years agoMerge branch 'wip/carlosg/rewritten-events-from-other-toplevels' into 'main'
Matthias Clasen [Sat, 19 Mar 2022 00:34:17 +0000 (00:34 +0000)]
Merge branch 'wip/carlosg/rewritten-events-from-other-toplevels' into 'main'

gtk/main: Make coords out of surface when rewriting events for grabs

Closes #4760

See merge request GNOME/gtk!4566

3 years agoMerge branch 'wip/chergert/gsk-gl-texture-library' into 'main'
Matthias Clasen [Fri, 18 Mar 2022 23:46:17 +0000 (23:46 +0000)]
Merge branch 'wip/chergert/gsk-gl-texture-library' into 'main'

gsk/gl: texture libraries, shader creation

See merge request GNOME/gtk!4583

3 years agogtkeventcontrollerscroll: Map surface scroll unit in discrete steps
panoplie [Thu, 24 Feb 2022 22:36:58 +0000 (23:36 +0100)]
gtkeventcontrollerscroll: Map surface scroll unit in discrete steps

3 years agorecorder: Show scroll events deltas unit
panoplie [Tue, 22 Feb 2022 13:12:44 +0000 (14:12 +0100)]
recorder: Show scroll events deltas unit

3 years agogtkrange: Add scroll unit handling
panoplie [Mon, 28 Feb 2022 20:45:06 +0000 (21:45 +0100)]
gtkrange: Add scroll unit handling

3 years agogtkscrolledwindow: Add scroll unit handling
panoplie [Mon, 21 Feb 2022 15:24:00 +0000 (16:24 +0100)]
gtkscrolledwindow: Add scroll unit handling

On the "scroll" signal, the widget uses
gtk_event_controller_scroll_get_unit() to get the
scroll unit.

When the unit is GDK_SCROLL_UNIT_WHEEL, the
behavior is unchanged: the widget scrolls a
certain number of pixels at each wheel detent
click. This number of pixels is determined by the
window dimensions in get_wheel_detent_scroll_step().

When the delta unit is GDK_SCROLL_UNIT_SURFACE, the
widget directly adds the delta to the number of
scrolled pixels no matter the window dimensions.

3 years agogtkeventcontrollerscroll: Add scroll unit getter
panoplie [Mon, 21 Feb 2022 15:23:24 +0000 (16:23 +0100)]
gtkeventcontrollerscroll: Add scroll unit getter

The scroll unit is accessible through
gtk_event_controller_scroll_get_unit() after the
"scroll" signal reception.

3 years agogdk: Add enum to indicate the unit of scroll deltas
panoplie [Mon, 21 Feb 2022 15:22:57 +0000 (16:22 +0100)]
gdk: Add enum to indicate the unit of scroll deltas

Add a new GdkScrollUnit enum that represent the
unit of scroll deltas provided by GdkScrollEvent.
The unit is accessible through
gdk_scroll_event_get_unit().

3 years agogsk/gl: use consistent library naming
Christian Hergert [Fri, 18 Mar 2022 21:55:13 +0000 (14:55 -0700)]
gsk/gl: use consistent library naming

3 years agogsk/gl: make texture libraries more autonomous
Christian Hergert [Fri, 18 Mar 2022 21:51:41 +0000 (14:51 -0700)]
gsk/gl: make texture libraries more autonomous

This moves a lot of the texture atlas control out of the driver and into
the various texture libraries through their base GskGLTextureLibrary class.

Additionally, this gives more control to libraries on allocating which can
be necessary for some tooling such as future Glyphy integration.

As part of this, the 1x1 pixel initialization is moved to the Glyph library
which is the only place where it is actually needed.

The compact vfunc now is responsible for compaction and it allows for us
to iterate the atlas hashtable a single time instead of twice as we were
doing previously.

The init_atlas vfunc is used to do per-library initialization such as
adding a 1x1 pixel in the Glyph cache used for coloring lines.

The allocate vfunc purely allocates but does no upload. This can be useful
for situations where a library wants to reuse the allocator from the
base class but does not want to actually insert a key/value entry. The
glyph library uses this for it's 1x1 pixel.

In the future, we will also likely want to decouple the rectangle packing
implementation from the atlas structure, or at least move it into a union
so that we do not allocate unused memory for alternate allocators.

3 years agogsk/gl: pin atlases to single texture library
Christian Hergert [Fri, 18 Mar 2022 19:48:43 +0000 (12:48 -0700)]
gsk/gl: pin atlases to single texture library

This removes the sharing of atlases across various texture libraries. Doing
so is necessary so that atlases can have different semantics for how they
allocate within the texture as well as potentially allowing for different
formats of texture data.

For example, in the future we might store non-pixel data in the textures
such as Glyphy or even keep glyphs with color content separate from glyphs
which do not and can use alpha channel only.

3 years agogsk/gl: add more control over shader generation
Christian Hergert [Thu, 17 Mar 2022 23:50:51 +0000 (16:50 -0700)]
gsk/gl: add more control over shader generation

This allows the gskglprograms.defs a bit more control over how a shader
will get generated and if it needs to combine sources. Currently, none of
the built-in shaders do that, but upcoming shaders which come from external
libraries will need the ability to inject additional sources in-between
layers.

3 years agogsk/gl: rename glyphs to glyphs_library
Christian Hergert [Thu, 17 Mar 2022 23:48:54 +0000 (16:48 -0700)]
gsk/gl: rename glyphs to glyphs_library

This naming style is less likely to collide with shader naming and makes
it clear where it is consumed what it is.

3 years agogsk/gl: allow configuring atlas size
Christian Hergert [Thu, 17 Mar 2022 23:43:58 +0000 (16:43 -0700)]
gsk/gl: allow configuring atlas size

3 years agogsk/gl: check for format as well
Christian Hergert [Mon, 14 Mar 2022 23:22:52 +0000 (16:22 -0700)]
gsk/gl: check for format as well

This could potentially happen if a uniform had never been set.

3 years agogsk/gl: only clear glyph cache durign reclaimation
Christian Hergert [Tue, 15 Mar 2022 22:55:30 +0000 (15:55 -0700)]
gsk/gl: only clear glyph cache durign reclaimation

We don't need to clear the front cache on every frame as we can clear it
specifically when we do reclaimation to avoid unnecessary memset() calls.

3 years agogsk/gl: ignore max_entry_size when zero
Christian Hergert [Tue, 15 Mar 2022 22:53:47 +0000 (15:53 -0700)]
gsk/gl: ignore max_entry_size when zero

If the max_entry_size is zero, then assume we can add anything to the
atlas. This allows for situations where we might be uploading an arc list
to the atlas instead of pixel data for GPU font rendering.

3 years agogsk/gl: make max-frame-age configurable
Christian Hergert [Tue, 15 Mar 2022 22:52:44 +0000 (15:52 -0700)]
gsk/gl: make max-frame-age configurable

This is nice for some texture libraries that we might want to keep around
for longer than say 60 frames such as a glyph cache.

3 years agogtk-demo: Don't hardcode a title font
Matthias Clasen [Fri, 18 Mar 2022 04:59:57 +0000 (00:59 -0400)]
gtk-demo: Don't hardcode a title font

We want a large font size, but we don't have to
hardcode Sans.

3 years agoMerge branch 'filefilter-suffixes' into 'main'
Matthias Clasen [Thu, 17 Mar 2022 16:57:09 +0000 (16:57 +0000)]
Merge branch 'filefilter-suffixes' into 'main'

filefilter: Fix <suffixes> in buildable

See merge request GNOME/gtk!4581

3 years agofilefilter: Fix <suffixes> in buildable
James Westman [Thu, 17 Mar 2022 15:49:39 +0000 (10:49 -0500)]
filefilter: Fix <suffixes> in buildable

A bug in GtkFileFilter's GtkBuildable implementation caused the
<suffixes> tag not to be recognized.

3 years agoUpdate Italian translation
Milo Casagrande [Thu, 17 Mar 2022 08:35:42 +0000 (08:35 +0000)]
Update Italian translation

(cherry picked from commit 3e4bfa2bae9c6e90005b57d9f9fe47d2301f0e0e)

3 years agoUpdate Italian translation
Milo Casagrande [Thu, 17 Mar 2022 08:34:04 +0000 (08:34 +0000)]
Update Italian translation

(cherry picked from commit 9bbf09fb0a9dbd8ae2c9e64a842138f182681d14)

3 years agoUpdate Serbian translation
Мирослав Николић [Thu, 17 Mar 2022 06:04:15 +0000 (06:04 +0000)]
Update Serbian translation

(cherry picked from commit c874f65d95beef98c99297f05bbed64e7e932f02)

3 years agoMerge branch 'wip/carlosg/im-wayland-serials' into 'main'
Carlos Garnacho [Wed, 16 Mar 2022 18:52:24 +0000 (18:52 +0000)]
Merge branch 'wip/carlosg/im-wayland-serials' into 'main'

gtk/imwayland: Use serial to control outbound messages

Closes #3641

See merge request GNOME/gtk!4398

3 years agogtk/imwayland: Use serial to control outbound messages
Carlos Garnacho [Tue, 18 Jan 2022 22:31:09 +0000 (23:31 +0100)]
gtk/imwayland: Use serial to control outbound messages

Following the text-input protocol changes at
https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/115,
use the serial number to have the client push changes to the
zwp_text_input_v3 object only after compositor/client states match.

This specifically is more lenient to compositors pushing multiple
.done events ahead of the client replying to them.

Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3641
3 years agoMerge branch 'wip/carlosg/im-text-location' into 'main'
Matthias Clasen [Wed, 16 Mar 2022 11:54:26 +0000 (11:54 +0000)]
Merge branch 'wip/carlosg/im-text-location' into 'main'

gtkimcontextwayland: Add native surface offset to input coordinates

Closes #4668

See merge request GNOME/gtk!4573

3 years agogtkimcontextwayland: Add native surface offset to input coordinates
Carlos Garnacho [Wed, 16 Mar 2022 08:55:20 +0000 (09:55 +0100)]
gtkimcontextwayland: Add native surface offset to input coordinates

We were missing the surface offset (e.g. shadows) at the time of expressing
the text caret location in surface coordinates. Add this offset so the
coordinates are as expected by the compositor.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/4668
3 years agoMerge branch 'gtk/gss-search-delay' into 'main'
Matthias Clasen [Tue, 15 Mar 2022 22:40:54 +0000 (22:40 +0000)]
Merge branch 'gtk/gss-search-delay' into 'main'

searchentry: Make search delay editable

Closes #4133

See merge request GNOME/gtk!4563

3 years agosearchentry: Make search delay editable
Ondřej Míchal [Fri, 11 Mar 2022 00:15:49 +0000 (02:15 +0200)]
searchentry: Make search delay editable

The default search delay of 150ms can be too low at times[0], leading app
developers to add additional delay while handling the search-changed
signal[1].

Based on past work from hugsie[2].

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

[0] https://github.com/getting-things-gnome/gtg/issues/281
[1] https://github.com/getting-things-gnome/gtg/pull/587
[2] https://gitlab.gnome.org/GNOME/gtk/-/issues/678

3 years agoUpdate Norwegian Bokmål translation
Kjartan Maraas [Tue, 15 Mar 2022 15:26:33 +0000 (15:26 +0000)]
Update Norwegian Bokmål translation

(cherry picked from commit 72a557087cd824f3e90c9b22ba05a0bef833a6a6)

3 years agoMerge branch 'main' into 'main'
Matthias Clasen [Tue, 15 Mar 2022 14:37:14 +0000 (14:37 +0000)]
Merge branch 'main' into 'main'

gtkplacessidebar: Prevent calling g_object_unref on null

See merge request GNOME/gtk!4569

3 years agoApply 1 suggestion(s) to 1 file(s)
Matthias Clasen [Tue, 15 Mar 2022 14:35:09 +0000 (14:35 +0000)]
Apply 1 suggestion(s) to 1 file(s)

3 years agoMerge branch 'wip/jimmac/symbolics-gnome-42-sync' into 'main'
Matthias Clasen [Tue, 15 Mar 2022 14:29:27 +0000 (14:29 +0000)]
Merge branch 'wip/jimmac/symbolics-gnome-42-sync' into 'main'

icons: update symbolics

See merge request GNOME/gtk!4571

3 years agogtk/main: Fix handling of !owner_events grabs
Carlos Garnacho [Tue, 15 Mar 2022 13:32:10 +0000 (14:32 +0100)]
gtk/main: Fix handling of !owner_events grabs

These are meant to always redirect events to the grabbing surface,
even for other surfaces of the same client. We weren't doing that
(instead letting the event go through unmodified), fix this handling
so GTK sees the events consistenty.

3 years agogtk/main: Make coords out of surface when rewriting events for grabs
Carlos Garnacho [Mon, 14 Mar 2022 12:29:11 +0000 (13:29 +0100)]
gtk/main: Make coords out of surface when rewriting events for grabs

If a grab is held on a toplevel surface tree, and events happen on a
different surface tree from another toplevel/window group, we rewrite
these events so they look like generated on the window group that
holds the grab, but it missed that coordinates would fail to be
translated, so these would stay unchanged and "pointing" to random
parts of the toplevel that is holding the grab and handling the events.

Since off-surface coordinates are not specially meaningful, and in
fact impossible to obtain in some backends, just fake the coordinates
making it sure that all rewritten events point outside the surface.

The grabbing window will still handle the events, but the coordinates
in these will be harmlessly moot.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/4760
3 years agoMerge branch 'avoid-objcopy-on-arm' into 'main'
Matthias Clasen [Tue, 15 Mar 2022 13:08:53 +0000 (13:08 +0000)]
Merge branch 'avoid-objcopy-on-arm' into 'main'

build: Avoid objcopy on arm

Closes #4757, #4748, and #4752

See merge request GNOME/gtk!4567

3 years agoicons: update symbolics
Jakub Steiner [Tue, 15 Mar 2022 07:31:26 +0000 (08:31 +0100)]
icons: update symbolics

- match the metaphors/style updates of gnome 42

See https://gitlab.gnome.org/GNOME/gtk/-/issues/4764

3 years agoUpdate Serbian translation
Мирослав Николић [Tue, 15 Mar 2022 06:33:22 +0000 (06:33 +0000)]
Update Serbian translation

(cherry picked from commit b59f9b97f38c40160c79d3c06e301f32eb9cb941)

3 years agoMerge branch 'builder-tool-nodisplay' into 'main'
Matthias Clasen [Mon, 14 Mar 2022 22:15:11 +0000 (22:15 +0000)]
Merge branch 'builder-tool-nodisplay' into 'main'

gtk-builder-tool: Operate without display

See merge request GNOME/gtk!4568

3 years agogtkplacessidebar: Prevent calling g_object_unref on null
Fina Wilke [Mon, 14 Mar 2022 21:33:35 +0000 (22:33 +0100)]
gtkplacessidebar: Prevent calling g_object_unref on null

g_object_unref would be called on a null end_icon when provider_account_status
is CLOUD_PROVIDERS_ACCOUNT_STATUS_IDLE

3 years agogtk-builder-tool: Operate without display
Matthias Clasen [Mon, 14 Mar 2022 19:40:12 +0000 (15:40 -0400)]
gtk-builder-tool: Operate without display

The simplify and validate commands can function
without a display connection, only preview absolutely
needs one. Allow this, by using gtk_init_check().

3 years agobuild: Avoid objcopy on arm
Matthias Clasen [Mon, 14 Mar 2022 12:44:09 +0000 (08:44 -0400)]
build: Avoid objcopy on arm

The trickery we do with objcopy and ld to speed up
resource inclusion does not seem to work right on
32bit Arm, so just skip it there.

Fixes: #4757, #4748, #4752
3 years agoUpdate German translation
Christian Kirbach [Sun, 13 Mar 2022 22:08:50 +0000 (22:08 +0000)]
Update German translation

(cherry picked from commit a1f473565213fbf74b1bab4f397a7099a0ce1c30)

3 years agoMerge branch 'wip/lantw/build-Don't-use-ld-and-objcopy-when-cross-compiling' into...
Matthias Clasen [Sun, 13 Mar 2022 14:31:23 +0000 (14:31 +0000)]
Merge branch 'wip/lantw/build-Don't-use-ld-and-objcopy-when-cross-compiling' into 'main'

build: Don't use ld and objcopy when cross-compiling

See merge request GNOME/gtk!4565

3 years agobuild: Don't use ld and objcopy when cross-compiling
Ting-Wei Lan [Sun, 13 Mar 2022 07:14:12 +0000 (15:14 +0800)]
build: Don't use ld and objcopy when cross-compiling

These commands don't work when compiling Windows binaries on Linux.

3 years agoUpdate Hungarian translation
Balázs Úr [Sun, 13 Mar 2022 00:23:04 +0000 (00:23 +0000)]
Update Hungarian translation

3 years agoMerge branch 'wip/chergert/for-main' into 'main'
Matthias Clasen [Sat, 12 Mar 2022 19:07:41 +0000 (19:07 +0000)]
Merge branch 'wip/chergert/for-main' into 'main'

macos: fit'n'finish fixes for main

See merge request GNOME/gtk!4564

3 years agoUpdate Kazakh translation
Baurzhan Muftakhidinov [Sat, 12 Mar 2022 13:23:19 +0000 (13:23 +0000)]
Update Kazakh translation

(cherry picked from commit 6ac723321f23e64e7045f27d7d6ccf5d21ed57ab)

3 years agoUpdate Swedish translation
Anders Jonsson [Sat, 12 Mar 2022 11:39:05 +0000 (11:39 +0000)]
Update Swedish translation

(cherry picked from commit 343b08f3e6b1c4922e9cc4e5a2fa8f9ffe01ff3b)

3 years agomacos: exclude popups from window list
Christian Hergert [Sat, 12 Mar 2022 06:36:26 +0000 (22:36 -0800)]
macos: exclude popups from window list

This probably only matters if you do window list integration for the global
menu on macOS.

3 years agomacos: pass events to foreign windows
Christian Hergert [Sat, 12 Mar 2022 02:25:47 +0000 (18:25 -0800)]
macos: pass events to foreign windows

3 years agomacos: clear sorted surfaces when showing file chooser
Christian Hergert [Sat, 12 Mar 2022 02:19:44 +0000 (18:19 -0800)]
macos: clear sorted surfaces when showing file chooser

When showing the native file chooser, we need to ensure we clear the
sorted surfaces in the display so that we don't risk delivering events
correctly on the next frame.

3 years agomacos: dont steal key window from NSPanel
Christian Hergert [Sat, 12 Mar 2022 02:07:34 +0000 (18:07 -0800)]
macos: dont steal key window from NSPanel

Or we risk making it really difficult to use native file choosers.

3 years agomacos: fix window level for popups
Christian Hergert [Sat, 12 Mar 2022 02:01:05 +0000 (18:01 -0800)]
macos: fix window level for popups

This comment isn't really accurate anymore it seems, so we can start
setting the proper stacking order for popups now.

3 years agomacos: fix attachment of popups to parents
Christian Hergert [Sat, 12 Mar 2022 01:53:42 +0000 (17:53 -0800)]
macos: fix attachment of popups to parents

We had code to do it and it never actually got used correctly. This ensures
that the popup services are attached to the parents so that they get proper
stacking orders when displayed. Additionally, it fixes popups from being
shown as their own windows in Exposé.

3 years agomacos: fix window activation during shadow click-through
Christian Hergert [Fri, 11 Mar 2022 01:26:56 +0000 (17:26 -0800)]
macos: fix window activation during shadow click-through

If we are clicking through the shadow of a window, we need to take special
care to not raise the old window on mouseUp. This is normally done by the
display server for us, so we need to use the proper API that is public to
handle this (rather than CGSSetWindowTags()). Doing so requires us to
dispatch the event to the NSView and then cancel the activcation from
the mouseDown: event there.

3 years agomacos: select new key window after processing events
Christian Hergert [Fri, 11 Mar 2022 08:50:10 +0000 (00:50 -0800)]
macos: select new key window after processing events

If we closed a key window in response to events, we need to denote another
window as the new key window. This is easiest to do from an idle so that
we don't clobber notification pairs of "did resign"/"did become" key
window.

We have a sorted set of surfaces by display server stacking, so we can
take the first one we come across that is already mapped and re-show it
to become key/main.

3 years agomacos: request layout with server-side decoration
Christian Hergert [Fri, 11 Mar 2022 07:16:38 +0000 (23:16 -0800)]
macos: request layout with server-side decoration

If we have server-side decorations we might need to request a layout in
response to the resize notification. We don't need to do this in other
cases because we already handle that in the process of doing the resize
(and that code is that way because of delayed delivery of NSNotification).

3 years agomacos: fix resize when using server-side decorations
Christian Hergert [Fri, 11 Mar 2022 02:58:10 +0000 (18:58 -0800)]
macos: fix resize when using server-side decorations

If we are using NSWindow titled windows, we don't end up waking up the
frame clock when the window is resized on the display server. This ensures
that we do that after getting a notification of resize.

3 years agomacos: set main window in addition to key
Christian Hergert [Fri, 11 Mar 2022 07:49:48 +0000 (23:49 -0800)]
macos: set main window in addition to key

If we are showing the window, we might also want to make it the main
window for the application when shown.

3 years agoUpdate Slovak translation
Dušan Kazik [Fri, 11 Mar 2022 07:43:53 +0000 (07:43 +0000)]
Update Slovak translation

(cherry picked from commit c8d1f23ff53ed40e8e033752eab81d3d9d118483)

3 years agoUpdate Hungarian translation
Balázs Úr [Fri, 11 Mar 2022 01:09:19 +0000 (01:09 +0000)]
Update Hungarian translation

3 years agoMerge branch 'better-format-conversions' into 'main'
Matthias Clasen [Thu, 10 Mar 2022 19:26:25 +0000 (19:26 +0000)]
Merge branch 'better-format-conversions' into 'main'

gdk: Clean up the optimised premultiply conversion function

See merge request GNOME/gtk!4550

3 years agoMerge branch 'wlprotocols-dependency-correctness' into 'main'
Matthias Clasen [Thu, 10 Mar 2022 19:15:39 +0000 (19:15 +0000)]
Merge branch 'wlprotocols-dependency-correctness' into 'main'

meson: use proper handling of wayland-protocols dependency

See merge request GNOME/gtk!4561

3 years agomacos: make transient-for key window when hiding surface
Christian Hergert [Thu, 10 Mar 2022 16:04:14 +0000 (08:04 -0800)]
macos: make transient-for key window when hiding surface

This only handled the popover case before and not the transient-for case.

3 years agomacos: actually drop unnecessary momentum events
Christian Hergert [Thu, 10 Mar 2022 11:21:12 +0000 (03:21 -0800)]
macos: actually drop unnecessary momentum events

These would get passed along to the NSApplication which we don't really
need to have happen. Denote it as such.

3 years agomacos: queue all pending events
Christian Hergert [Thu, 10 Mar 2022 11:20:07 +0000 (03:20 -0800)]
macos: queue all pending events

Rather than process these a single event at a time, queue all of the
outstanding events from the NSEvent queue.

3 years agomeson: use proper handling of wayland-protocols dependency
Eli Schwartz [Thu, 10 Mar 2022 05:08:36 +0000 (00:08 -0500)]
meson: use proper handling of wayland-protocols dependency

Ensure that resolution of the subproject occurs via the dependency
interface, not the "poke at subprojects manually" interface, and make
that actually work via --wrap-mode=forcefallback.

There's no need to mark it as not-required and then manually invoke
subproject(), since fallback should work correctly and it is always
needed.

However, if fallback was performed (or forced) it would error out since
get_variable() was instructed to only use pkg-config while the relevant
variable was exported by the subproject as an internal fallback
dependency.

3 years agoMerge branch 'wip/jimmac/legacy-icons-gtk4' into 'main'
Matthias Clasen [Wed, 9 Mar 2022 23:37:26 +0000 (23:37 +0000)]
Merge branch 'wip/jimmac/legacy-icons-gtk4' into 'main'

icons: add missing legacy fullcolor

See merge request GNOME/gtk!4558

3 years agomacos: drop enter/exit when in manual drag/resize
Christian Hergert [Wed, 9 Mar 2022 21:20:53 +0000 (13:20 -0800)]
macos: drop enter/exit when in manual drag/resize

If we are in a manual resize/drag then we don't want to generate crossing
events as they can just confuse things.

3 years agomacos: allow dropping NSEvent without propagation
Christian Hergert [Wed, 9 Mar 2022 21:19:22 +0000 (13:19 -0800)]
macos: allow dropping NSEvent without propagation

There are cases we might want to consume a NSEvent without creating a
GdkEvent or passing it along to the NSApplication for processing. This
creates a new value we can use and check against to propagate that without
having to do out parameters at the slightly odd invalid pointer value for
a GdkEvent (similar to how MMAP_FAILED is done).

3 years agomacos: do not focus new window when resigning main
Christian Hergert [Mon, 7 Mar 2022 22:31:23 +0000 (14:31 -0800)]
macos: do not focus new window when resigning main

This can get in the way of how we track changes while events are actively
processing. Instead, we may want to delay this until the next main loop
idle and then check to see if we have a main window as the NSNotification
may have come in right after this.

3 years agoUpdate Finnish translation
Jiri Grönroos [Wed, 9 Mar 2022 19:03:37 +0000 (19:03 +0000)]
Update Finnish translation

(cherry picked from commit d188c6dbaf4c2d55a53379bc6aafa091913480c9)

3 years agoMerge branch 'fix_gtk_accessible_update_relation_example' into 'main'
Emmanuele Bassi [Wed, 9 Mar 2022 18:22:54 +0000 (18:22 +0000)]
Merge branch 'fix_gtk_accessible_update_relation_example' into 'main'

fix docs for gtk_accessible_update_relation example

See merge request GNOME/gtk!4559

3 years agoFixed Czech translation
Marek Černocký [Wed, 9 Mar 2022 18:06:22 +0000 (19:06 +0100)]
Fixed Czech translation

3 years agofix docs for gtk_accessible_update_relation example
Caolán McNamara [Wed, 9 Mar 2022 12:27:32 +0000 (12:27 +0000)]
fix docs for gtk_accessible_update_relation example

3 years agoicons: add missing legacy fullcolor
Jakub Steiner [Wed, 9 Mar 2022 15:19:16 +0000 (16:19 +0100)]
icons: add missing legacy fullcolor

- relied on in testsuite

See https://gitlab.gnome.org/GNOME/gtk/-/issues/4754

3 years agoUpdate Swedish translation
Anders Jonsson [Wed, 9 Mar 2022 10:49:50 +0000 (10:49 +0000)]
Update Swedish translation

(cherry picked from commit 9053fd8335ff5bd8a94171b791a70347ebc232e9)

3 years agoMerge branch 'fix-focus-issues' into 'main'
Matthias Clasen [Tue, 8 Mar 2022 19:37:45 +0000 (19:37 +0000)]
Merge branch 'fix-focus-issues' into 'main'

Fix some focus issues

See merge request GNOME/gtk!4556

3 years agoUpdate Persian translation
Danial Behzadi [Tue, 8 Mar 2022 15:00:39 +0000 (15:00 +0000)]
Update Persian translation

(cherry picked from commit a9720259f00de1ff9ab99b60627af34c0bbe5c90)

3 years agotext: Stop blinking when we lose focus
Matthias Clasen [Mon, 7 Mar 2022 18:33:45 +0000 (11:33 -0700)]
text: Stop blinking when we lose focus

We were looking at GtkWidget:has-focus from
event controller signal handlers here, but
the widget property is only changed after
the event controllers.

3 years agofocus controller: Update for active window
Matthias Clasen [Mon, 7 Mar 2022 18:32:22 +0000 (11:32 -0700)]
focus controller: Update for active window

When the window gains or looses active status,
update the focus controllers status.

3 years agowindow: Update has-focus property
Matthias Clasen [Mon, 7 Mar 2022 18:35:09 +0000 (11:35 -0700)]
window: Update has-focus property

Update the :has-focus property of the focus
widget when the active status of the window
changes.

We change the property after generating the
GDK_CROSSING_ACTIVE crossing events.

3 years agoUpdated Danish translation
Ask Hjorth Larsen [Tue, 8 Mar 2022 00:28:14 +0000 (01:28 +0100)]
Updated Danish translation

3 years agoUpdated Danish translation of gtk-properties
Ask Hjorth Larsen [Tue, 8 Mar 2022 00:28:11 +0000 (01:28 +0100)]
Updated Danish translation of gtk-properties

3 years agoUpdated Lithuanian translation
Aurimas Černius [Mon, 7 Mar 2022 16:29:37 +0000 (18:29 +0200)]
Updated Lithuanian translation

3 years agoMerge branch 'gdk-tests-naming' into 'main'
Emmanuele Bassi [Mon, 7 Mar 2022 15:34:31 +0000 (15:34 +0000)]
Merge branch 'gdk-tests-naming' into 'main'

Use the correct name for installed gdk tests

See merge request GNOME/gtk!4555

3 years agoUse the correct name for installed gdk tests
Sebastien Bacher [Mon, 7 Mar 2022 15:13:38 +0000 (16:13 +0100)]
Use the correct name for installed gdk tests

3 years agoUpdate Swedish translation
Luna Jernberg [Mon, 7 Mar 2022 08:09:32 +0000 (08:09 +0000)]
Update Swedish translation

(cherry picked from commit 89bba41fd75346aaee5037db7275cfe3c1925fa0)

3 years agoMerge branch 'wip/chergert/for-main' into 'main'
Matthias Clasen [Sun, 6 Mar 2022 01:36:13 +0000 (01:36 +0000)]
Merge branch 'wip/chergert/for-main' into 'main'

macos: fixes for main

See merge request GNOME/gtk!4553

3 years agomacos: fix cursor blink time
Christian Hergert [Thu, 3 Mar 2022 04:32:19 +0000 (20:32 -0800)]
macos: fix cursor blink time

The value from settings is for the duration of the blink period, not the
timeout. This fixes the blink lasting longer than 10 seconds.

3 years agomacos: require input region to become key
Christian Hergert [Thu, 3 Mar 2022 03:59:15 +0000 (19:59 -0800)]
macos: require input region to become key

Some things cannot become key windows (like tooltips). We can use the
input_region existence to determine if we should allow it as a key window.

3 years agoMerge branch 'fix-doc-typo' into 'main'
Matthias Clasen [Sat, 5 Mar 2022 05:50:10 +0000 (05:50 +0000)]
Merge branch 'fix-doc-typo' into 'main'

Fix a documentation typo

Closes #4747

See merge request GNOME/gtk!4552