Commit Graph

72608 Commits

Author SHA1 Message Date
Ivan Molodetskikh
8f2be7e840 scrollable: Clarify when to set adjustment props
Instead of populating the properties right away (when the widget might
not have been allocated yet, and hence cannot know the right values),
the widget should queue an allocation, where it will populate the
values.
2022-04-21 19:24:52 -04:00
Matthias Clasen
14772602a0 gsk/gl: Typo fix 2022-04-21 19:24:41 -04:00
Matthias Clasen
93921f32bd gtk-demo: Small fixup to the cursors demo 2022-04-21 19:24:24 -04:00
Carlos Garnacho
812c8926ec imwayland: Do not defer commit() after set_surrounding_text()
For reasons that only apply to the old serial handling, asking for
the surrounding after IM changes resulted in lazy handling of
commit() afterwards.

With the recent interpretation of serials, this problem became more
apparent, since it is in fact very likely that the last interaction
step after an IM change is notifying of the changed surrounding
text after the IM change was applied.

Make handling of surrounding text similar to caret position changes,
always commit() after the state change, but skip through non-changes.

This makes the compositor state fully up-to-date after an IM change.
2022-04-21 19:24:00 -04:00
Carlos Garnacho
b14bc4749e imwayland: Connect OSK activating gesture to parent widget on editables
The gesture as connected currently on the child GtkText is easily overridden
by the parent editables (and gently done so in the attempt to consume all
clicks).

Connect this gesture to the parent editable widget in these cases, so the
gesture can cohabit with the click-consuming one. It's not part of the same
group, but it won't be abruptly cancelled.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/4795
2022-04-21 19:23:48 -04:00
Sebastian Keller
d56276f6d6 testsuite: Add unaligned-offscreen test
Tests whether text rendered to an offscreen node unaligned with the
pixel grid introduces blurriness.
2022-04-21 19:23:13 -04:00
Sebastian Keller
f1d44635bd gsk/gl: Always align offscreen rendering with the pixel grid
This fixes two issues with the offscreen rendering code for nodes with
bounds not aligned with the pixel grid:

1.) When drawing to an offscreen buffer the size of the offscreen buffer
was rounded up, but then later when used as texture the vertices
correspond to the original bounds with the unrounded size. This could
then result in the offscreen texture being drawn onscreen at a slightly
smaller size, which then lead to it being visually shifted and blurry.

This is fixed by adjusting the u/v coordinates to ignore the padding
region in the offscreen texture that got added by the size increase from
rounding.

2.) The viewport used when rendering to the offscreen buffer was not
aligned with the pixel grid for nodes at coordinates not aligned with
the pixel grid. Then because the content of the offscreen buffer is not
aligned with the pixel grid and later when used as textures sampling
from it will result in interpolated values for an onscreen pixel. This
could also result in shifting and blurriness, especially for nested
offscreen rendering at different offsets.

This is fixed by adding similar padding at the beginning of the
texture and also adjusting the u/v coordinates to ignore this region.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3833
2022-04-21 19:23:06 -04:00
Maximiliano Sandoval R
de8cb17ee8 application: Add link and inline code blocks 2022-04-21 19:22:38 -04:00
Maximiliano Sandoval R
e69eb24b32 filter: Add link to FilterListmodel 2022-04-21 19:22:33 -04:00
Maximiliano Sandoval R
4a388b5540 texttag: Correct typo
Does not generate a gir docstring without it.
2022-04-21 19:22:27 -04:00
Matthias Clasen
25bedcd85d inspector: Avoid another crash
We need to handle all event types here.
This was tripping over GDK_TOUCHPAD_HOLD events.
2022-04-21 19:20:10 -04:00
Matthias Clasen
feb3d3b274 inspector: Avoid a crash
Attribute lists can be NULL, it turns out.
2022-04-21 19:19:45 -04:00
Matthias Clasen
e191519d30 css: Plug a memory leak
We were leaking the terms of calc values. Oops.
2022-04-21 19:19:33 -04:00
illiliti
aa1921cbef meson: Use proper type for bools
Fix invalid usage of bools which violates official meson specification and thus
breaks muon, an implementation of meson written in C.
2022-04-21 19:18:55 -04:00
Matthias Clasen
e2abb0211c imcontextsimple: Plug a memory leak 2022-04-21 19:18:34 -04:00
Maximiliano Sandoval R
b024c9a743 docs: Fix links in selection models 2022-04-21 19:18:25 -04:00
Xavier Claessens
91c60dcac0 Remove #ifdef ENABLE_NLS
libintl API is guaranteed to always be available, glib will fallback to
proxy-libintl in case gettext is not found.
2022-04-21 19:18:00 -04:00
Dr. David Alan Gilbert
66117d1017 x11: Check return of gdk_x11_get_xatom_name_for_display
When given an invalid atom, gdk_x11_get_xatom_name_for_display can
return NULL and trigger a seg in gdk_x11_clipboard_formats_from_atoms.
Check for NULL.

Why I'm seeing a bad atom there is probably a separate question.
https://bugzilla.redhat.com/show_bug.cgi?id=2037786
2022-04-21 19:17:54 -04:00
Chun-wei Fan
177302cf4d inspector/general.c: Check whether GL context supports WGL
We may well be using an EGL context that does not support Desktop (W)GL on
Windows, such as in the case of using libANGLE.  So, check whether WGL is
supported for this running instance before trying to query WGL extensions.

This will get rid of warning messages from libepoxy.
2022-04-21 19:16:13 -04:00
Alexander Mikhaylenko
d1fc90e8a2 eventcontrollerscroll: Always propagate hold events
Otherwise a stray scroll controller may prevent others from getting hold
events, even if it always propagates scroll events and does absolutely
nothing.
2022-04-21 19:15:58 -04:00
Christoph Reiter
da152ac37e CI: clean up MSYS2 build dependencies
We only need a C compiler and not the whole toolchain,
and gst-plugins-bad was split into libraries and plugins.
pkg-config -> pkgconf.

This should speed the CI setup up a bit.
2022-04-21 19:15:52 -04:00
Matthias Clasen
29d4821e3d inspector: Allow viewing PangoAttrList properties
We have pango_attr_list_to/from_string, so this is
easy. The editing UI isn't ideal, but it solves my
immediate need to see attributes.
2022-04-21 19:15:20 -04:00
Christian Hergert
cbd03cda56 gdk/gl: handle GL_RGBA/GL_UNSIGNED_NORMALIZED
WebKit's GTK 4 port can give us textures with an internal format of
GL_RGBA with GL_UNSIGNED_NORMALIZED and a bit-depth of 8. This fixes
warnings for every GdkGLTexture created/delivered to the GskGLRenderer.

The format is essentially the same as GL_RGBA8 since it is normalized
between 0.0..1.0 for 8-bit components.

Fixes #4783
2022-04-21 19:15:05 -04:00
Sebastian Keller
018bbd6774 surface: Use correct display when destroying a surface for depth switch
When surface depth switches from non-high-depth to high-depth (or vice
versa) the current surface has to be destroyed before a new one can be
created for this window. eglDestroySurface however was getting passed a
GdkDisplay, rather than the EGLDisplay it expects. As a result the old
surface did not get destroyed and the new surface could not be created
causing rendering to freeze.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/4773
2022-04-21 19:14:32 -04:00
Christian Hergert
e50e2136d2 Default: avoid use of opacity for overlay scrollbars
If using the opacity CSS property the renderer cannot optimize these
handles without the use of offscreens due to the use of both a border
and rgb render node.

Instead, we can apply the alpha to the color values and get the same
effect in a way that the GL renderer can optimize without the use of
offscreen textures for a sizeable reduction in runtime overhead.
2022-04-21 19:14:14 -04:00
Yosef Or Boczko
a5eeb99f37 popover-menu: Fix buttons' position in RTL
The radio/check/previous buttons shows in
the wrong place in RTL. Fix it.

#4641

Signed-off-by: Yosef Or Boczko <yoseforb@gmail.com>
2022-04-21 19:14:03 -04:00
aneejit1
52cb3b2ec4 Check for 'rst2man' misses installed 'rst2man.py' (#4728)
By default, 'docutils' installs 'rst2man' as 'rst2man.py'. Amend the
check for 'rst2man' to look for 'rst2man.py' as well if 'rst2man' is
not found.
2022-04-21 19:13:54 -04:00
Matthias Clasen
9ca55cb5bf Merge branch 'cherry-pick-b67da389' into 'gtk-4-6'
Backport: gtkimmulticontext: Handle switches between displays

See merge request GNOME/gtk!4660
2022-04-20 15:35:21 +00:00
Carlos Garnacho
bc4b2c142f gtkimmulticontext: Handle switches between displays
Currently the GtkIMMultiContext may stick to a delegate GtkIMContext
that no longer applies after the multicontext is dissociated from
any widget.

Handle set_client_widget() so that it can handle changes between
widgets from 2 different display, but also so the delegate is made
NULL whenever the context has a NULL widget.

Doing so, any new client widget results in a new delegate IM context
lookup from the right GdkDisplay and GtkSettings, which avoids any
mix up.

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


(cherry picked from commit b67da38916)
2022-04-20 14:54:04 +00:00
Matthias Clasen
b65d7c86d7 Merge branch 'filechooser-fixes-4-6' into 'gtk-4-6'
filechooser: cherry-pick fixes from main for 4.6

See merge request GNOME/gtk!4654
2022-04-20 01:34:51 +00:00
Matthias Clasen
cc37c9c86c Merge branch 'ebassi/issue-4825-backport' into 'gtk-4-6'
a11y: Defer object registration after root registration

See merge request GNOME/gtk!4658
2022-04-20 01:30:51 +00:00
Emmanuele Bassi
e41a4ced8b a11y: Defer object registration after root registration
The root accessible object is registered asynchronously, as it needs to
call a method on the AT-SPI registry daemon. This means we need to defer
registering the GtkAtSpiContext on the accessibility bus and in the
cache until after the registration is complete.

Fixes: #4825
2022-04-19 22:05:46 +01:00
Matthias Clasen
eb2699aa9f filechooser: Small fix for save mode
When changing folders, we were making the select
button insensitive when there's no files around.
That doesn't make sense in save mode when we don't
want to select a file but create one.

Fixes: #4851
2022-04-19 13:51:44 +02:00
Matthias Clasen
fcab393c3b filechooser: Prevent random completion popups
It is very irritating when the entry completion popup
appears not in response to user input in the entry.
In particular, when that happens right as the dialog
is shown.

To prevent that, temporarily disable completion
when setting the entry text programmatically.
2022-04-19 13:49:31 +02:00
Luca Bacci
8a6de521e7 Merge branch 'gdk-win32-fix-mouse-move-crossing-events-gtk-4-6' into 'gtk-4-6'
GdkWin32: Mouse events fixes

See merge request GNOME/gtk!4627
2022-04-08 13:58:29 +00:00
Luca Bacci
88db5509a3 GdkWin32: Generate crossing event after button release
Fixes #4813
2022-04-08 15:26:48 +02:00
Luca Bacci
7538ff9798 GdkWin32: Correct generation of crossing events when holding an implicit grab
Fixes #4722
2022-04-08 15:26:37 +02:00
Luca Bacci
c0a60ece97 GdkWin32: Report serial for events 2022-04-08 15:26:26 +02:00
Luca Bacci
c799b05f2a Merge branch 'backport-4406-4.6' into 'gtk-4-6'
gdkclipboard-win32.c: Fix call to gdk_clipboard_claim_remote() (backport MR !4604 to gtk-4-6)

See merge request GNOME/gtk!4608
2022-04-08 08:30:48 +00:00
Christian Hergert
d468dd2f3b Merge branch 'sumibi-yakitori/fix-minimize-window-macos' into 'main'
macos: Fix problem that window cannot be minimized by user operation

Closes #4811

See merge request GNOME/gtk!4613

(cherry picked from commit d75147db0a)

d3cf7088 macos: Skip running `showAndMakeKey` when a window is minimized by user action
2022-04-04 18:53:35 +00:00
Christian Hergert
029fc0fdef Merge branch 'sumibi-yakitori/fix-maximize-window-macos' into 'main'
macos: prohibit fullscreen transition if in transtion

This prevents performing additional fullscreen transitions while
a transition is already in progress.

Closes #4808

See merge request GNOME/gtk!4612

(cherry picked from commit 15b7a4572b)

69a0a5cf macos: Prohibit changing the full-screen state of a window during a full-screen transition
229e4b58 macos: Corrected code style
2022-04-03 22:15:16 +00:00
Andika Triwidada
c43737324a Update Indonesian translation 2022-04-01 04:10:57 +00:00
Andika Triwidada
270e643c7b Update Indonesian translation 2022-04-01 04:04:49 +00:00
Chun-wei Fan
edd8d55b42 gdkclipboard-win32.c: Fix call to gdk_clipboard_claim_remote()
The call to gdk_win32_clipboard_request_contentformats() can return NULL even
without an error condition being hit (such as when the system clipboard is
empty), so check whether the returned GdkContentFormat pointer is not NULL
before calling gdk_clipboard_claim_remote(), which expects it to be not NULL,
otherwise we face a warning from that funtion and the subsequent
g_object_unref().

This at least partially fixes issue #4796.
2022-04-01 10:28:37 +08:00
Rūdolfs Mazurs
3b50f2e8b9 Update Latvian translation 2022-03-27 20:19:10 +00:00
Rūdolfs Mazurs
d4dd7969d6 Update Latvian translation 2022-03-27 19:53:51 +00:00
Emmanuele Bassi
a0bebefef8 Merge branch 'cherry-pick-351ffef7' into 'gtk-4-6'
overlaylayout: Set position style class on child

See merge request GNOME/gtk!4598
2022-03-27 18:24:38 +00:00
António Fernandes
42a4c62025 overlaylayout: Set position style class on child
As documented:
> Overlay children whose alignments cause them to be positioned
> at an edge get the style classes “.left”, “.right”, “.top”, 
> and/or “.bottom” according to their position.

Likely accidental regression in b7ee2cbc28

Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/2099

(cherry picked from commit 351ffef704)
2022-03-27 17:50:16 +00:00
Bruce Cowan
dd198cfc06 Update British English translation 2022-03-24 13:19:20 +00:00
Marek Černocký
3ef96c445f Updated Czech translation 2022-03-21 12:16:07 +01:00