Commit Graph

72848 Commits

Author SHA1 Message Date
Sebastian Keller
85a6517d65 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-04 21:40:01 +02:00
Christian Hergert
d75147db0a 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
2022-04-04 18:53:19 +00:00
sumibi-yakitori
d3cf7088b3 macos: Skip running showAndMakeKey when a window is minimized by user action
When a window is minimized by user action, the `showAndMakeKey` method is not executed when idle. This prevents the window from being un-minimized immediately.
And allow programmatic minimization of a window by un-minimizing them in `_gdk_macos_toplevel_surface_present`

Closes #4811
2022-04-05 01:06:44 +09:00
Maximiliano Sandoval R
ffa7185397
application: Add link and inline code blocks 2022-04-04 14:11:16 +02:00
Maximiliano Sandoval R
d7fe62817c
filter: Add link to FilterListmodel 2022-04-04 14:10:56 +02:00
Maximiliano Sandoval R
a034bdb17e
texttag: Correct typo
Does not generate a gir docstring without it.
2022-04-04 14:10:18 +02:00
Matthias Clasen
af20f7e9b5 gl: Don't leak big glyphs
We were never resetting the accessed bit of
glyphs that are big enough to be stored individually,
so these would just accumulate and never be dropped.
2022-04-03 20:25:22 -04:00
Christian Hergert
15b7a4572b 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
2022-04-03 22:14:52 +00:00
sumibi-yakitori
146bb70c2e macos: prohibit fullscreen transition if in transtion
This prevents performing additional fullscreen transitions while
a transition is already in progress.
2022-04-03 22:14:52 +00:00
Matthias Clasen
494de142f6 Merge branch 'matthiasc/for-main' into 'main'
inspector: Avoid a crash

See merge request GNOME/gtk!4617
2022-04-03 20:11:29 +00:00
Matthias Clasen
5d979cde82 inspector: Avoid another crash
We need to handle all event types here.
This was tripping over GDK_TOUCHPAD_HOLD events.
2022-04-03 15:55:21 -04:00
Matthias Clasen
f48b894468 inspector: Avoid a crash
Attribute lists can be NULL, it turns out.
2022-04-03 15:55:21 -04:00
Matthias Clasen
a6e47892be Merge branch 'matthiasc/for-main' into 'main'
gsk: Plug a memory leak

See merge request GNOME/gtk!4616
2022-04-03 14:21:13 +00:00
Matthias Clasen
1e0c25d96a Merge branch 'meson_fixes' into 'main'
meson: Use proper type for bools

See merge request GNOME/gtk!4615
2022-04-03 12:41:14 +00:00
Matthias Clasen
f57eec5288 css: Plug a memory leak
We were leaking the terms of calc values. Oops.
2022-04-03 08:04:35 -04:00
illiliti
e938befcbc 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-03 14:55:33 +03:00
Matthias Clasen
2af8ac655b gsk: Plug a memory leak
This was introduced in 9defc7fc64.
2022-04-03 07:34:44 -04:00
Matthias Clasen
cc3c0125a8 Merge branch 'matthiasc/for-main' into 'main'
imcontextsimple: Plug a memory leak

See merge request GNOME/gtk!4614
2022-04-02 19:47:03 +00:00
Matthias Clasen
59f9be457f imcontextsimple: Plug a memory leak 2022-04-02 15:30:47 -04:00
Emmanuele Bassi
d1ce514260 Merge branch 'selection-model-docs' into 'main'
docs: Fix links in selection models

See merge request GNOME/gtk!4609
2022-04-01 11:20:11 +00:00
Maximiliano Sandoval R
ad5e72728f
docs: Fix links in selection models 2022-04-01 13:04:14 +02:00
Andika Triwidada
1bf24f7b19 Update Indonesian translation 2022-04-01 03:56:36 +00:00
Matthias Clasen
a3cedb0163 Merge branch 'clipboard-seg' into 'main'
x11: Check return of gdk_x11_get_xatom_name_for_display

See merge request GNOME/gtk!4607
2022-04-01 00:56:32 +00:00
Matthias Clasen
97bab27d82 Merge branch 'fix-win32-empty-clipboard' into 'main'
gdkclipboard-win32.c: Fix call to gdk_clipboard_claim_remote() (check GdkContentFormat is not NULL

Closes #4796

See merge request GNOME/gtk!4604
2022-04-01 00:56:02 +00:00
Matthias Clasen
6030da573d Merge branch 'nls' into 'main'
Remove #ifdef ENABLE_NLS

See merge request GNOME/gtk!4606
2022-03-31 17:07:37 +00:00
Matthias Clasen
0128574ca1 Merge branch 'wip/carlosg/immulticontext-display-switch' into 'main'
gtkimmulticontext: Handle switches between displays

Closes #4805

See merge request GNOME/gtk!4605
2022-03-31 16:29:38 +00:00
Christoph Reiter
b27a169200 Merge branch 'msys2-ci-cleanup' into 'main'
CI: clean up MSYS2 build dependencies

See merge request GNOME/gtk!4600
2022-03-31 15:46:54 +00:00
Xavier Claessens
bcd0704511 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-03-31 11:41:34 -04:00
Dr. David Alan Gilbert
506566b6a4 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-03-31 15:56:09 +01:00
Carlos Garnacho
b67da38916 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
2022-03-31 16:35:29 +02:00
Chun-wei Fan
8519ab56f5 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-03-31 10:55:39 +08:00
Chun-wei Fan
89d87e3482 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-03-30 16:09:18 +08:00
Carlos Garnacho
04c9c6b428 Merge branch 'wip/exalm/scroll-hold' into 'main'
eventcontrollerscroll: Always propagate hold events

See merge request GNOME/gtk!4599
2022-03-28 14:27:55 +00:00
Alexander Mikhaylenko
9bd8ed0d82 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-03-28 12:04:15 +00:00
Rūdolfs Mazurs
40386c97eb Update Latvian translation
(cherry picked from commit 3b50f2e8b9)
2022-03-27 20:19:34 +00:00
Rūdolfs Mazurs
6649cc6e5e Update Latvian translation
(cherry picked from commit d4dd7969d6)
2022-03-27 19:54:19 +00:00
Christoph Reiter
e69dc04a7f 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-03-27 20:10:58 +02:00
Emmanuele Bassi
c1361f7a5a Merge branch 'antoniof-main-patch-34986' into 'main'
overlaylayout: Set position style class on child

Closes nautilus#2099

See merge request GNOME/gtk!4597
2022-03-27 16:25:50 +00:00
António Fernandes
351ffef704 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
2022-03-27 14:59:10 +00:00
Pablo Correa Gómez
314a75ed0f Set use_underline property for GtkCheckButton label conditionally
Otherwise, if the user set the property to False before creating or
setting the label, the label property will be overriden
2022-03-25 14:35:16 +01:00
Matthias Clasen
a1ddd3fead Merge branch 'inspector-attributes' into 'main'
inspector: Allow viewing PangoAttrList properties

See merge request GNOME/gtk!4596
2022-03-25 13:03:00 +00:00
Matthias Clasen
79f0f4ee8e 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-03-25 08:35:16 -04:00
Matthias Clasen
7b8bfb4c80 Merge branch 'main' into 'main'
Check for 'rst2man' misses installed 'rst2man.py' (#4728)

See merge request GNOME/gtk!4586
2022-03-25 11:48:28 +00:00
Benjamin Otte
7106cf6524 Merge branch 'wip/chergert/fix-gl-rgba' into 'main'
gdk/gl: handle GL_RGBA/GL_UNSIGNED_NORMALIZED

Closes #4783

See merge request GNOME/gtk!4594
2022-03-25 01:34:15 +00:00
Christian Hergert
e706e14fd9 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-03-24 18:05:11 -07:00
Matthias Clasen
3f1021048f Merge branch 'want_prepare_without_play_for_size' into 'main'
GtkMediaStream with gstreamer backend isn't 'prepared' until media is played

See merge request GNOME/gtk!4560
2022-03-24 19:19:01 +00:00
Matthias Clasen
ddba7f8601 Apply 1 suggestion(s) to 1 file(s) 2022-03-24 17:16:11 +00:00
Bruce Cowan
1660a0eaf1 Update British English translation
(cherry picked from commit dd198cfc06)
2022-03-24 13:19:45 +00:00
Kukuh Syafaat
ffffb382e2 Update Indonesian translation 2022-03-23 15:39:17 +00:00
Kukuh Syafaat
09453bc60b Update Indonesian translation 2022-03-23 13:46:25 +00:00