Matthias Clasen
0f2bce941a
fontchooser: Flip models around
...
Make the fontchooser use a GtkFilterListModel
wrapping a GtkSingleSelection, instead of the
other way around. This exercises the new
selection model support in GtkFilterListModel.
2023-06-04 20:35:50 -04:00
Matthias Clasen
0a7fb26909
filterlistmodel: Implement GtkSelectionModel
...
Pass through selections from an underlying selection
model.
Tests included.
2023-06-04 20:35:50 -04:00
Matthias Clasen
444d5fa500
Merge branch 'drop-x11-dnd-keynav' into 'main'
...
x11: Stop using passive grabs
See merge request GNOME/gtk!6055
2023-06-03 19:38:24 +00:00
Matthias Clasen
c380d17621
Revert "gdk/x11: Also grab keyboard during XDnD grabs"
...
This reverts commit ae94417f80
.
2023-06-03 12:25:25 -04:00
Matthias Clasen
686d18dfc2
x11: Stop using passive grabs
...
The keynav that this implements is half-broken under
xwayland anyway, and it confused and complicates things
on the compositor side.
2023-06-03 12:25:25 -04:00
Benjamin Otte
0a1702ae99
Merge branch 'wip/otte/fix-glx' into 'main'
...
glx: Trap errors inside loop
Closes #5857
See merge request GNOME/gtk!6056
2023-06-03 16:19:09 +00:00
Benjamin Otte
0016fea36b
glx: Trap errors inside loop
...
Instead of trapping errors for the whole loop trying to create GL
contexts, trap them once per GL context.
Apparently GLX does throw an error when a too high version is requested
and doesn't just return NULL and then that error lingers when we try
lower versions.
Fixes #5857
2023-06-03 18:03:56 +02:00
Matthias Clasen
7ef46293aa
Merge branch 'wip/antoniof/boxlayout-baseline-optional' into 'main'
...
boxlayout: Don't always reserve height for baseline alignment
Closes #5863
See merge request GNOME/gtk!6053
2023-06-03 11:01:40 +00:00
António Fernandes
6b59c138b2
boxlayout: Don't always reserve height for baseline alignment
...
Otherwise an horizontal box may have a larger minumum height than
any of its children even though non of them is baseline-aligned.
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/5863
2023-06-02 20:18:56 +01:00
Matthias Clasen
c8c895d160
Merge branch 'trap-bad-rr-errors' into 'main'
...
x11: Trap XRandr errors when getting outputs during init and update
See merge request GNOME/gtk!6046
2023-06-02 11:31:45 +00:00
Luca Bacci
acbd7f212e
Merge branch 'for-main' into 'main'
...
GdkWin32 Cleanup
See merge request GNOME/gtk!5714
2023-06-02 09:34:48 +00:00
Marco Trevisan (Treviño)
f2a2889153
x11: Trap XRandr errors when getting outputs during init and update
...
We may try to update the XRR outputs and Crtcs when they're changing in
the server, and so we may get BadRROutput that we're currently not
handling properly.
As per this, use traps and check whether we got errors, and if we did
let's ignore the current output.
It's not required to call init_randr13() again because if we got errors
it's very likely that there's a change coming that will be notified at
next iteration during which we'll repeat the init actions.
2023-06-02 00:30:14 +02:00
Matthias Clasen
a4ae215309
Merge branch 'sumibi-yakitori/fix-glcontext-macos' into 'main'
...
macOS: Fix problems with OpenGL context creation on macOS
Closes #5811
See merge request GNOME/gtk!6044
2023-06-01 20:58:22 +00:00
Daniel Boles
fa16ba12cf
Window: Copy caveats from :*visible to the setters
2023-06-01 20:31:22 +01:00
Daniel Boles
ec2421b187
Window: Fix wrong case in property attribute which
...
rendered the literal text `org.gtk.MEthod.set_property focus-visible`.
2023-06-01 20:26:57 +01:00
sumibi-yakitori
1fce2b1e06
Fix an issue where min_version
was not being used as the minimum version required by GTK
2023-06-01 23:05:44 +09:00
Matthias Clasen
38bf843de8
Merge branch 'wip/alice/muxer-fix' into 'main'
...
actionmuxer: Correctly notify actions after reparenting
Closes #5861
See merge request GNOME/gtk!6043
2023-06-01 10:54:33 +00:00
sumibi-yakitori
7b8a5235d4
Fix a bug in error checking conditions. This avoids unintentional Legacy
of the created OpenGL context
2023-06-01 16:46:24 +09:00
sumibi-yakitori
3c9b3ead6f
The GL version reported by epoxy seems to depend on the current GL context, so the GL context to create should be the one determined by gdk_gl_context_get_matching_version
2023-06-01 16:43:57 +09:00
Alice Mikhaylenko
1549ec5f9b
actionmuxer: Correctly notify actions after reparenting
...
When registering an observer, we send a notification and for that we need
to query the action's state and param type. When setting up a muxer parent,
same thing happens, except the action is queried on the parent instead.
This means that the muxer will notify observers about the parent's actions,
but not about its own.
Add a test to verify it works.
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/5861
2023-06-01 06:39:44 +04:00
Matthias Clasen
4339e8e464
Merge branch 'matthiasc/for-main' into 'main'
...
gsk: Support straight alpha textures
See merge request GNOME/gtk!6041
2023-05-31 19:14:07 +00:00
Matthias Clasen
39f4d5ccf7
gltexturebuilder: Update the docs
...
We do handle unpremultiplied alpha correctly (albeit
non-optimally) now.
2023-05-31 14:39:07 -04:00
Matthias Clasen
957fa87fce
gsk: Support straight alpha textures
...
This is not the optimal way of doing it: we're
reuploading the texture with client-side conversion.
But it fits nicely into our current handling of mipmaps.
We can do better once we use shaders for colorspace
conversions.
2023-05-31 14:37:33 -04:00
Matthias Clasen
e8bdd46d8d
Merge branch 'a11y-crash' into 'main'
...
label: Fix crashes when executing a11y actions
See merge request GNOME/gtk!6034
2023-05-31 12:27:49 +00:00
Erik Schilling
d03b27b441
label: Fix crashes when executing a11y actions
2023-05-31 12:27:48 +00:00
Matthias Clasen
f4cbe26af3
Merge branch 'more-texture-tests' into 'main'
...
testsuite: Add more download tests
See merge request GNOME/gtk!6038
2023-05-31 12:01:31 +00:00
Luca Bacci
24af4b48cc
GdkWin32: Remove unused functions
2023-05-31 12:15:57 +02:00
Luca Bacci
1c8caf745f
GdkWin32: Remove declarations of unused types from gdkprivate-win32.h
2023-05-31 12:15:57 +02:00
Luca Bacci
395d80f131
GdkWin32: Remove declarations of unexisting functions from gdkprivate-win32.h
2023-05-31 12:15:57 +02:00
Luca Bacci
74229572e7
GdkWin32: Remove defines for old MinGW headers
2023-05-31 12:15:57 +02:00
Luca Bacci
cbb3d3f177
GdkWin32: Remove _gdk_display_hdc global variable
2023-05-31 12:15:57 +02:00
Luca Bacci
8861d0eb53
GdkWin32: Turn a few functions to static
...
When used only in the source file they're defined in.
Also remove the corresponding declarations from
gdkrivate-win32.h.
2023-05-31 12:15:57 +02:00
Luca Bacci
a23bc894e9
GdkWin32: Remove unused debug functions
...
* _gdk_win32_print_paletteentries
* _gdk_win32_print_system_palette
* _gdk_win32_print_hpalette
* _gdk_win32_drag_protocol_to_string
* _gdk_win32_data_to_string
* _gdk_win32_gdkrectangle_to_string
* _gdk_win32_cairo_region_to_string
* _gdk_win32_surface_description
2023-05-31 12:15:57 +02:00
Luca Bacci
156e25b6aa
Update manifest XML for the GTK DLL
2023-05-31 12:15:49 +02:00
Matthias Clasen
96f6787a3e
testsuite: Add more download tests
...
Add some odd-sized texture sizes to the
download tests, to trigger alignment issues
in the various upload code paths. And add
a size that is bigger than the max-texture-size
we force in one of our test setups.
To compensate, reduce the number of
runs per size from 20 to 10.
2023-05-30 23:01:20 -04:00
Matthias Clasen
cc665f29ea
testsuite: Plug a memory leak
2023-05-30 22:37:03 -04:00
Matthias Clasen
8d2047c824
testsuite: Use proper alignment when uploading to GL
2023-05-30 22:36:41 -04:00
Matthias Clasen
a79da8b655
Improve test coverage for GdkGLTexture
2023-05-30 22:36:10 -04:00
Matthias Clasen
f29c7e76f5
gltexture: Use proper alignment for downloads
2023-05-30 22:35:45 -04:00
Matthias Clasen
29867e7ae1
NEWS: Updates
2023-05-30 20:21:13 -04:00
Matthias Clasen
876b439d4a
Merge branch 'matthiasc/conversion-tests' into 'main'
...
Texture format work
See merge request GNOME/gtk!6035
2023-05-31 00:13:51 +00:00
Matthias Clasen
4f6d7c69a1
gltexturebuilder: Document format expectations
...
Provide some details about storage and alpha handling.
2023-05-30 19:46:13 -04:00
Matthias Clasen
2bf2635635
testsuite: Exclude some formats on GLES
...
GLES < 3.2 has some problems with 16-bit formats,
so exclude these from our download tests.
2023-05-30 19:46:13 -04:00
Matthias Clasen
67ed09f5ae
testsuite: Add tests for native GL textures
...
Create GL textures in gray and GA formats
and check that we can download from them
successfully.
2023-05-30 19:46:13 -04:00
Matthias Clasen
1c72f46eed
gltexture: Rewrite downloading code
...
For non-gles, make it handle unpremultiplied formats,
and everything else, by downloading the texture in its
preferred format and, in most cases, doing a
gdk_memory_convert afterwards.
For gles, keep using glReadPixels, but handle cases
where the gl read format doesn't match the texture
format by doing the necessary swizzling before calling
gdk_memory_convert.
2023-05-30 15:57:18 -04:00
Matthias Clasen
f5e7a1d4cc
Merge branch 'fix-selection-input-stream-leak' into 'main'
...
gtkselectioninputstream-x11: Do not leak the stream and double-free the EOF bytes marker
Closes #4892
See merge request GNOME/gtk!6037
2023-05-30 19:10:49 +00:00
Matthias Clasen
0f61c52593
gdk: Simplify gdk_memory_format_gl_format
...
Make the callers of this function check for
straight alpha themselves, and only do the
version compatibility check here. This makes
the function usable in contexts where straight
alpha is acceptable.
2023-05-30 14:49:45 -04:00
Matthias Clasen
a4bae6a62d
gsk: Use matching memory format
...
memory_format_gl_format returns the new memory
format if it made a change, we should not drop
that on the floor.
2023-05-30 14:41:01 -04:00
Sophie Herold
d141ac5adf
gdk: Add gray/alpha memory formats to testsuite
2023-05-30 14:41:01 -04:00
Sophie Herold
894a4bda85
gdk: Support gray/alpha in PNG loader
2023-05-30 14:41:01 -04:00
Sophie Herold
2b88505ca4
gdk: Support gray/alpha in TIFF loader
...
Use PHOTOMETRIC_MINISBLACK for grayscale image
2023-05-30 14:41:01 -04:00
Sophie Herold
ef8c835762
gsk: Support swizzle for gray and alpha formats
...
Swizzling is needed to display one channel memory formats
as gray etc.
2023-05-30 14:41:01 -04:00
Sophie Herold
50115d70c6
gdk: Add grayscale and alpha memory formats
2023-05-30 14:41:01 -04:00
Luca Bacci
1a058a41c9
Do not keep HINSTANCE variables around
...
Use &__ImageBase for the GTK DLL and GetModuleHandle (NULL)
for the application module. Then remove DllMain as it's not
necessary anymore.
References:
[1] Accessing the current module's HINSTANCE from a static library:
https://devblogs.microsoft.com/oldnewthing/20041025-00/?p=37483
2023-05-30 19:31:54 +02:00
Marco Trevisan (Treviño)
be4f6ff3da
gdkselectioninputstream-x11: Explicitly handle stream ownership in signal
...
The display xevent signal connection takes the ownership of the stream
until we get a valid event, so it should manage the stream lifetime.
So make this clearer, by automatically removing the stream reference
when we disconnect from the xevent signal handler.
2023-05-30 17:59:19 +02:00
Marco Trevisan (Treviño)
4fcf899852
gdkselectioninputstream-x11: Make it clearer how we manage the stream ownership
...
It gets unreffed during gdk_x11_selection_input_stream_complete, so use
APIs that make this clearer.
2023-05-30 17:54:29 +02:00
Marco Trevisan (Treviño)
371e860184
gtkselectioninputstream-x11: Do not add an extra reference to the returned stream
...
We create a new stream during gdk_x11_selection_input_stream_new_async()
then such stream is referenced when passed to the task via
g_task_return_pointer(), so there's no need to reference it again before
returning it, or we'd end up leaking.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/4892
2023-05-30 17:50:56 +02:00
Marco Trevisan (Treviño)
bce1e0bfdd
gtkselectioninputstream-x11: Do not add unreffed bytes to the chunks queue
...
This should never happen, but we may exit the loop because of count value
with an unreffed bytes pointer being added back to the chunks queue.
2023-05-30 17:43:57 +02:00
Marco Trevisan (Treviño)
468d2cb7f2
gtkselectioninputstream-x11: Do not add EOF marker twice to the chunks queue
...
We were adding the same EOF marker two times back to the chunks queue,
one implicitly, and the other time could happen when exiting the loop.
2023-05-30 17:42:59 +02:00
Jordi Mas
b520a5ceda
Update Catalan translation
2023-05-30 06:41:10 +02:00
Matthias Clasen
e6bc82cff5
Merge branch 'fix_gtkstack_crash' into 'main'
...
GtkStack: Fix a potential crash in gtk_stack_get_first_accessible_child
See merge request GNOME/gtk!6031
2023-05-29 23:38:05 +00:00
Matthias Clasen
d021aa7bd2
Merge branch 'macos-fixes' into 'main'
...
For main
See merge request GNOME/gtk!6032
2023-05-29 23:37:22 +00:00
Benjamin Otte
3dc3d03a08
testsuite: Add conversion tests
...
Ensure we can convert from any format to any other format.
2023-05-30 00:42:10 +02:00
Benjamin Otte
788bd575d6
testsuite: Disable certain texture download tests
...
The GL renderers like to premultiply content that isn't, and due to the
data loss with alpha == 0 (transparent white, transparent black and
transparent anything are all represented by (0, 0, 0, 0) when
premultiplied) these values cannot be converted back.
2023-05-30 00:42:10 +02:00
Benjamin Otte
94a2dc4c47
testsuite: Update memorytexture test for TextureDownloader
...
There is no longer a need to use gdk_texture_download() and force
conversion to ARGB8 format. We can download the pixels in the original
format again.
That way we avoid testing the conversion code and avoid having to deal
with differences in representable colors.
However, some formats do do conversions, so we allow pixel comparisons
to be accurate (requires 16bit comparison accuracy) or inaccurate (we
only care about 8bit).
Note that for the default RGBA formats, this is identical and means they
need to be bit-exact the same, no matter what.
But the higher bit depth formats may be more different - floating point
can even have different values with high accuracy (the float mantissa is
23 bit, we only care about 16).
2023-05-30 00:42:10 +02:00
Benjamin Otte
169a7f83e6
testsuite: Imitate gdk_memory_convert() correctly
...
The formula use to compute pixel values from GdkRGBA floats was slightly
adapted some time ago, copy that adaptation
2023-05-30 00:39:46 +02:00
Luca Bacci
703494c7fa
testsuite: rename 'wait' function to 'timed_loop'
...
When compiling for macOS, CLang errors out because a non-static
wait function is declared in sys/wait.h.
2023-05-29 16:43:28 +02:00
Luca Bacci
d642072603
Check for NULL groups in gtk_action_muxer_get_group ()
...
The groups hash table is initialized lazily when inserting
the first GActionGroup (gtk_action_muxer_insert ()). Do as
all surrounding code does and check for NULL before using
groups.
This avoids triggering a warning
2023-05-29 16:43:28 +02:00
Lukáš Tyrychtr
ab7a4f64cb
GtkStack: Fix a potential crash in gtk_stack_get_first_accessible_child
...
This one can occur when the stack has no pages.
2023-05-29 15:14:51 +02:00
Luca Bacci
21c53a1969
Merge branch 'win32-monitors' into 'main'
...
GdkWin32Monitor fixes
See merge request GNOME/gtk!6015
2023-05-29 09:50:30 +00:00
Matthias Clasen
ae2dd1d907
Merge branch 'matthiasc/for-main' into 'main'
...
css: Add a test for non-ASCII font family
See merge request GNOME/gtk!6028
2023-05-28 17:58:38 +00:00
Matthias Clasen
f10c234361
css: Add a test for non-ASCII font family
...
This came up in #5852 , so make sure that it works.
2023-05-28 07:57:40 -04:00
Matthias Clasen
3a650bff66
Merge branch 'matthiasc/for-main' into 'main'
...
Annotate more enum additions
See merge request GNOME/gtk!6027
2023-05-28 11:41:48 +00:00
Matthias Clasen
e9f622b81f
listitemmanager: Small docs clarifications
...
If we write docs for private functions,
lets make them relevant.
2023-05-28 07:19:02 -04:00
Matthias Clasen
a85ad2ce67
Annotate more enum additions
...
We have the technology now, lets use it.
2023-05-28 07:19:02 -04:00
Daniel Boles
2af7e45860
MenuButton: Always mention child@always-show-arrow
...
get_always_show_arrow() did not mention at all that the custom child is
relevant. set_always_show_arrow() only did in the blurb, not for the arg
2023-05-28 11:35:44 +01:00
Matthias Clasen
2741e00210
Merge branch 'test-sections' into 'main'
...
testsections: A testbed for sections
See merge request GNOME/gtk!6025
2023-05-28 01:54:06 +00:00
Matthias Clasen
495411e16d
testsections: A testbed for sections
...
Add a simple test client that lets us compare
and explore the section handling in listview
and gridview.
2023-05-27 21:30:14 -04:00
Matthias Clasen
9880f9d16a
Merge branch 'slice-sections' into 'main'
...
Beef up our section models
Closes #5854
See merge request GNOME/gtk!6009
2023-05-28 01:00:04 +00:00
Matthias Clasen
5c1c22156c
sortlistmodel: Optimize signals
...
When we emit items-changed due to a section
sorter change, don't also emit sections-changed.
Instead make the items-changed signal cover the
whole range.
Tests included.
2023-05-27 20:37:28 -04:00
Matthias Clasen
d7e8c52d37
Merge branch 'fix-section-sorter-keys' into 'main'
...
sortlistmodel: Fix handling of section sort keys
Closes #5854
See merge request GNOME/gtk!6024
2023-05-27 23:37:35 +00:00
Matthias Clasen
c3d3e2d47b
sortlistmodel: Fix handling of section sort keys
...
When the section sorter changes, we need to update
the keys, otherwise the sorter will continue to report
the old sections.
This code is currently a bit suboptimal, since the
creation of sort keys and section sort keys are
muddled together.
Fixes : #5854
2023-05-27 19:09:05 -04:00
Matthias Clasen
9c1049e710
multiselection: Pass through sections-changed
...
If our underlying model emits sections-changed,
we need to pass it on.
Add a test for this too.
2023-05-27 17:27:19 -04:00
Matthias Clasen
a1352a88ff
singleselection: Pass through sections-changed
...
If our underlying model emits sections-changed,
we need to pass it on.
Add a test for this too.
2023-05-27 17:27:19 -04:00
Matthias Clasen
8825917140
noselection: Pass through sections-changed
...
If our underlying model emits sections-changed,
we need to pass it on.
Add a test for this too.
2023-05-27 17:27:19 -04:00
Matthias Clasen
ba8d4902b5
filterlistmodel: Pass through sections-changed
...
If our underlying model emits sections-changed,
we need to pass it on.
Add a test for this too.
2023-05-27 17:27:19 -04:00
Matthias Clasen
8f3d3ca587
slicelistmodel: Pass through sections
...
Implement GtkSectionModel in the obvious way.
Tests included.
2023-05-27 17:27:19 -04:00
Matthias Clasen
aeba1e08e8
sortlistmodel: Emit sections-changed
...
When a new section sorter is set, potentially
all sections have changed. So emit sections-changed
for all items.
Tests included.
2023-05-27 17:27:19 -04:00
Matthias Clasen
9f47bfe193
sortlistmodel: Fix handling of section sort keys
...
When the section sorter changes, we need to update
the keys, otherwise the sorter will continue to report
the old sections.
This code is currently a bit suboptimal, since the
creation of sort keys and section sort keys are
muddled together.
Fixes : #5854
2023-05-27 17:27:19 -04:00
Benjamin Otte
43417e9e55
Merge branch 'columnview-sections' into 'main'
...
Columnview sections
See merge request GNOME/gtk!6006
2023-05-27 18:51:12 +00:00
Matthias Clasen
bbb7446e93
Merge branch 'matthiasc/for-main' into 'main'
...
docs: Cosmetics
See merge request GNOME/gtk!6023
2023-05-27 18:42:34 +00:00
Matthias Clasen
6623baeb52
docs: Cosmetics
2023-05-27 14:40:49 -04:00
Matthias Clasen
d90b09f8c3
Merge branch 'matthiasc/for-main' into 'main'
...
sortlistmodel: Cosmetics
See merge request GNOME/gtk!6022
2023-05-27 18:30:37 +00:00
Matthias Clasen
bcae6271df
Merge branch 'handle-sections-changed' into 'main'
...
wip: list widgets: handle sections-changed
See merge request GNOME/gtk!6011
2023-05-27 17:55:00 +00:00
Matthias Clasen
fc524ed346
Cosmetics
...
Fix copy-paste errors in line 1.
2023-05-27 13:51:39 -04:00
Matthias Clasen
c80a0c0e85
sortlistmodel: Cosmetics
...
Make the set_[section]_sorter functions a bit more symmetric.
2023-05-27 13:47:46 -04:00
Matthias Clasen
7572f2ed87
columnview: Add section plumbing
...
Add a header-factory property, and pass it through
to the listview.
2023-05-27 13:39:55 -04:00
Matthias Clasen
54ec750238
Merge branch 'matthiasc/for-main' into 'main'
...
gtk: Annotate new enum values
See merge request GNOME/gtk!6021
2023-05-27 13:35:27 +00:00
Matthias Clasen
5d78cf6546
Merge branch 'wip/kabus/popover-direction' into 'main'
...
gtk/popover: Flip anchoring direction in RTL
Closes #5847
See merge request GNOME/gtk!6020
2023-05-27 13:19:28 +00:00
Khalid Abu Shawarib
d329b00bda
gtk/popover: Flip anchoring direction in RTL
2023-05-27 13:19:28 +00:00
Matthias Clasen
ddf1ea9917
gtk: Annotate new enum values
...
We have decorators now to tell compilers when
enum values were added, so lets use them for the
new GtkAlign values.
2023-05-27 08:02:15 -04:00
Matthias Clasen
215f60e450
listitemmanager: Listen to sections-changed
...
And recreate header and footer tiles as needed.
This commit was tested using a sortlistmodel, changing
the section sorter from sorting only by first char
to sorting by the first two chars, which changes
the number of sections, but leaves the alphabetic
order of items unchanged.
2023-05-27 06:33:50 -04:00
Sabri Ünal
87070e0bdd
Update Turkish translation
2023-05-26 22:48:53 +00:00
Matthias Clasen
19f51b5de2
Merge branch 'docs/gdk-RGBA-parse' into 'main'
...
docs: add HSL to Gdk.RGBA.parse
See merge request GNOME/gtk!6017
2023-05-25 17:40:08 +00:00
FineFindus
2d8c112f08
docs: add HSL to Gdk.RGBA.parse
...
Update the Gdk.RGBA.parse docs to reflect the ability to parse HSL, which has been added in 4.5.0.
2023-05-25 17:16:55 +02:00
Matthias Clasen
f1901081a6
NEWS: Updates
2023-05-24 22:03:48 -04:00
Jason Francis
cf79ad4433
win32: implement fullscreen_on_monitor
...
Track the HMONITOR so it can be used by the toplevel layout.
2023-05-24 18:48:37 -04:00
Benjamin Otte
d912628583
Merge branch 'wip/otte/for-main' into 'main'
...
2 GDK GL XWayland improvements
See merge request GNOME/gtk!6014
2023-05-24 22:22:48 +00:00
Jason Francis
f254ab700c
win32: Invalidate inactive monitors
...
Without this, there are still GdkMonitors present for displays that are
present but disconnected (such as when a laptop disables the internal
display to connect to an external monitor).
2023-05-24 17:34:34 -04:00
Benjamin Otte
c7b62d89e3
glx: Implement support for EXT_swap_control
...
XWayland (at least on gnome-shell) does not support SGI_swap_control,
which we were using to unset the swap interval.
It does support EXT_swap_control though, which is the more modern
version of the same thing, so this commit adds support for that.
And now GDK_DEBUG=no-vsync gives me >1000fps instead of just 60fps,
2023-05-24 21:44:43 +02:00
Benjamin Otte
46e3454eb7
gl: Update tracked buffers from 2 to 4
...
With XWayland and direct scanout it is possible that some apps get into
a situation where more than 2 buffers are in flight and in that case we
want to be able to still track the change regions for those buffers.
Usually 3 buffers are in use, so we go one higher, just to be safe.
2023-05-24 21:44:43 +02:00
Benjamin Otte
7573a9d2a7
gl: Rewrite update area tracking code
...
Make it more generic. That way we could dynamically change the number of
buffers we track.
We don't do that yet though.
2023-05-24 21:44:29 +02:00
Carlos Garnacho
d24d193301
Merge branch 'lores-scroll-mid-detent' into 'main'
...
Send low-res scroll event in the middle of the wheel detent
See merge request GNOME/gtk!5128
2023-05-24 14:23:47 +00:00
José Expósito
e61938793a
gtkeventcontrollerscroll: Send lores scroll in the middle of the detent
...
Some mice send a value slightly lower than 120 for some detents. The
current approach waits until a value of 120 is reached before sending a
low-resolution scroll event.
For example, the MX Master 3 sends a value of 112 in some detents:
detent detent
| | |
^ ^ ^
112 REL_WHEEL 224
As illustrated, only one event was sent but two were expected. However,
sending the low-resolution scroll event in the middle plus the existing
heuristics to reset the accumulator solve this issue:
detent detent
| | |
^ ^ ^ ^
REL_WHEEL 112 REL_WHEEL 224
Send low-resolution scroll events in the middle of the detent to solve
this problem.
Related to https://gitlab.gnome.org/GNOME/mutter/-/issues/2469
2023-05-24 13:42:49 +00:00
Matthias Clasen
2f584c16f0
Merge branch 'reomveunused' into 'main'
...
widget: Don't include gtkpopover.h
See merge request GNOME/gtk!6012
2023-05-23 23:49:25 +00:00
Maximiliano Sandoval R
2565a28e59
widget: Don't include gtkpopover.h
...
It is not used.
2023-05-23 23:43:15 +02:00
Emmanuele Bassi
793a2b2a70
Merge branch 'zbrown/marshallers' into 'main'
...
marshallers: fix up some mistypes in drags
See merge request GNOME/gtk!6010
2023-05-23 13:50:26 +00:00
Matthias Clasen
146223cd74
Merge branch 'fix-menu-padding' into 'main'
...
menus: Avoid unnecessary right padding
Closes #5839
See merge request GNOME/gtk!6008
2023-05-22 20:50:56 +00:00
Daniel Boles
d8e7f0a8a9
MenuButton: Fix small grammar-o/match related syms
2023-05-22 21:39:36 +01:00
Matthias Clasen
a9adf7163f
menus: Avoid unnecessary right padding
...
We are using placeholders in the 'check' column
that are put in a size group, so that they all
take the same space once a check or radio is shown.
Unfortunately, for the inline-buttons option, we
were using a GtkBuiltinIcon as placeholder, and those
respect the -gtk-icon-size CSS property and take
a minimum size of 16px. Use a GtkGizmo instead to
get the expected result of no extra padding unless
there's a check or radio.
Fixes : #5839
2023-05-22 16:16:45 -04:00
Matthias Clasen
10825cdc72
Merge branch 'matthiasc/for-main' into 'main'
...
widget-factory: Align some widgets better
See merge request GNOME/gtk!6007
2023-05-22 13:17:58 +00:00
Matthias Clasen
3b105a637c
widget-factory: Align some widgets better
2023-05-22 08:36:13 -04:00
Matthias Clasen
fdbc203690
Merge branch 'wip/kabus/date-leak' into 'main'
...
gtk/recentmanager: Fix date leak
Closes #5842
See merge request GNOME/gtk!6005
2023-05-22 12:25:24 +00:00
Khalid Abu Shawarib
26c583227e
gtk/recentmanager: Fix date leak
2023-05-22 12:25:24 +00:00
Арсений Засыпкин
1ea0bebf15
Update Russian translation
2023-05-22 12:18:13 +00:00
Matthias Clasen
ca0e27ec9d
Merge branch 'matthiasc/for-main' into 'main'
...
Improve section model docs
See merge request GNOME/gtk!6003
2023-05-21 23:57:48 +00:00
Matthias Clasen
5edf9fc449
Merge branch 'fm-showitems' into 'main'
...
filelauncher: Use ShowItems to show in File Manager
Closes #5842
See merge request GNOME/gtk!5997
2023-05-21 23:22:57 +00:00
Matthias Clasen
534f11e317
Improve section model docs
...
Mention sections in the list widget overview,
and document the list models that support sections.
2023-05-21 19:20:08 -04:00
Zander Brown
d8cffa9350
marshallers: fix up some mistypes in drags
...
Fix: ff330668cf
2023-05-21 19:14:45 +01:00
Matthias Clasen
60dfa777f0
Merge branch 'gdk-introspection-fix' into 'main'
...
introspection: Include deprecated gdk api in gir
See merge request GNOME/gtk!5999
2023-05-21 14:25:59 +00:00
Matthias Clasen
d6fc0d6c94
gdk: Fix up introspection build
...
Referring to files across directories is not
easy, we need to use files() in just the right
way to make this work.
2023-05-21 09:46:49 -04:00
Matthias Clasen
4e71bd92aa
introspection: Include deprecated gdk api in gir
...
This was overlooked in when the headers were moved
in ed265f6a7e
.
2023-05-21 09:39:13 -04:00
Matthias Clasen
8aec42244e
Merge branch 'ebassi/build-introspection' into 'main'
...
ci: Add introspection to the feature flags
See merge request GNOME/gtk!6000
2023-05-21 12:20:12 +00:00
Emmanuele Bassi
6ff36977f4
ci: Add introspection to the feature flags
...
It should be enabled by default, if we ever want to catch issues.
2023-05-21 12:22:50 +01:00
Matthias Clasen
ed84ccdaca
Merge branch 'docs-css-fix' into 'main'
...
Fix typo in CSS docs
See merge request GNOME/gtk!5998
2023-05-21 11:02:45 +00:00
Arjan Molenaar
d9ec27ab29
Fix typo in CSS docs
2023-05-21 12:11:19 +02:00
Matthias Clasen
ca744b925e
Merge branch 'list-tile-gc' into 'main'
...
Add gtk_list_item_manager_gc_tiles
See merge request GNOME/gtk!5995
2023-05-21 00:51:00 +00:00
Matthias Clasen
53c63673e4
gridview: Use gtk_list_item_manager_gc_tiles
...
This simplifies the code a bit.
2023-05-20 19:50:11 -04:00
Matthias Clasen
431458ed78
listview: Use gtk_list_item_manager_gc_tiles
...
This simplifies the code a bit.
2023-05-20 19:50:11 -04:00
Matthias Clasen
56cfef3544
testsuite: Use gtk_list_item_manager_gc_tiles
...
Use this new api instead of open-coding it.
Also, assert that it merges consecutive
multi-item tiles.
2023-05-20 19:50:11 -04:00
Calvin Walton
be897646b1
filelauncher: Use ShowItems to show in File Manager
...
The non-portal fallback method for launching a file manager to show the
file in its parent directory was incorrectly using the `ShowFolders`
method (open a folder) instead of `ShowItems` (open the parent directory
and show the file).
The `show_item` function (previously `show_folder`) had an unused
`callback` parameter; it has been removed and the type of the parameter
containing the GTask has been renamed and now uses the correct type
instead of gpointer to reduce the amount of casting required.
Fixes GNOME/gtk#5842
2023-05-20 19:40:09 -04:00
Matthias Clasen
e23358e09f
Merge branch 'matthiasc/for-main' into 'main'
...
Cosmetics
See merge request GNOME/gtk!5996
2023-05-20 23:22:56 +00:00
Matthias Clasen
833e1bdcf6
Cosmetics
...
Fix some typos.
2023-05-20 19:03:41 -04:00
Matthias Clasen
0091425729
listitemmanager: Stop exporting tile_gc
...
This function is now just used internally,
so make it static.
2023-05-20 18:59:16 -04:00
Matthias Clasen
b1c2a1c015
listitemmanager: Use gc_tiles
...
Replace an open-coded version of this function
with a call to gtk_list_item_manager_gc_tiles.
2023-05-20 18:59:16 -04:00
Matthias Clasen
31d03f9f26
Add gtk_list_item_manager_gc_tiles
...
This will allow us to simplify size allocation
code in listview and gridview.
2023-05-20 16:17:11 -04:00
Benjamin Otte
3beaf0962c
Merge branch 'drop-filler-tiles' into 'main'
...
Drop the FILLER tile type
See merge request GNOME/gtk!5993
2023-05-20 17:18:53 +00:00
Matthias Clasen
48e49b4c50
gridview: Update factories in set_factory
...
Call update_factories() so the children get their
factories properly updated.
This matches what GtkListView does.
2023-05-20 12:53:39 -04:00
Matthias Clasen
1d4f383ba5
Drop the FILLER tile type
...
It is not used anymore.
2023-05-20 12:28:19 -04:00
Matthias Clasen
8cb3e01eef
gridview: Stop using a filler tile
...
We can just use the footer to fill that space.
2023-05-20 12:28:19 -04:00
Matthias Clasen
42a0dcc7e4
gridview: Add an assertion
...
The want to use the footer tile at the end
to fill leftover space at the bottome right.
So lets assert that we actually dealing with
a footer tile, just in case something changes
in the future that might have us end up with
some other kind of tile.
2023-05-20 12:26:51 -04:00
Matthias Clasen
e9731fc99b
Add some tile helpers
2023-05-20 12:26:39 -04:00
Matthias Clasen
2890557236
Revert "gridview: GC tiles first"
...
This reverts commit e121a5ca6f
.
The tile that was causing the critical in #5836
(what that commit was about) was a FILLER, and we
are getting rid of FILLER tiles here. Which will
avoid the issue in a more elegant way.
2023-05-20 12:25:33 -04:00
Matthias Clasen
43a22bb350
Cosmetics
...
Use the proper g_assert variant.
2023-05-20 07:39:21 -04:00
Matthias Clasen
cd9c277820
Merge branch 'ci-clang-build' into 'main'
...
ci: Add a clang build
See merge request GNOME/gtk!5987
2023-05-18 19:10:52 +00:00
Matthias Clasen
42a12f1788
ci: Add a clang build
...
This is meant to catch build errors with clang.
2023-05-18 14:39:46 -04:00
Matthias Clasen
5f39820729
cups: Silence a compiler warning
...
Bitfields should be unsigned int.
2023-05-18 14:39:46 -04:00
Matthias Clasen
c2a8620660
gsk: Mark some variables as unused
...
Hopefully that shuts up clang.
2023-05-18 13:29:28 -04:00
Asier Sarasua Garmendia
647d5e17c1
Update Basque translation
...
(cherry picked from commit a6931a66c5
)
2023-05-18 16:31:00 +00:00
Matthias Clasen
d87b9ee4c5
Merge branch 'matthiasc/for-main' into 'main'
...
roaring: Mark a variable as unused
See merge request GNOME/gtk!5990
2023-05-18 13:35:17 +00:00
Matthias Clasen
70ba00ae53
testsuite: Make this test compile
...
clang did not like this creative use of
strings at all. Rightfully so.
2023-05-18 08:40:50 -04:00
Matthias Clasen
c4fb473d4b
roaring: Mark a variable as unused
...
Otherwise clang complains.
2023-05-18 08:34:48 -04:00
Matthias Clasen
b4fbd74f98
Merge branch 'fina/scrolled-window-measure' into 'main'
...
scrolledwindow: Propagate child measure size whenever possible
Closes #5838
See merge request GNOME/gtk!5986
2023-05-18 12:26:05 +00:00
Fina Wilke
7fae0bc0de
scrolledwindow: Propagate child measure size whenever possible
...
In height-for-width and hscrollbar-policy = never, we can provide
the child with a proper for_size when measuring it. The same is true for
width-for-height and vscrollbar-policy = never.
This allows for accurately measuring the size of eg. wrapping labels.
2023-05-18 13:25:20 +02:00
Benjamin Otte
89b61eeec4
Merge branch 'listview-factory-leak' into 'main'
...
listview: Don't leak the factories
See merge request GNOME/gtk!5989
2023-05-17 18:57:28 +00:00
Matthias Clasen
e2492dd568
gridview: Don't leak the factory
2023-05-17 14:32:55 -04:00
Matthias Clasen
ca000287fc
listview: Don't leak the factories
2023-05-17 14:17:47 -04:00
Benjamin Otte
ff14fea672
Merge branch 'fix-gridview-critical' into 'main'
...
gridview: GC tiles first
Closes #5836
See merge request GNOME/gtk!5988
2023-05-17 17:04:43 +00:00
Matthias Clasen
e121a5ca6f
gridview: GC tiles first
...
Before checking that there are no tiles,
we need to gc any possibly leftover filler
tiles.
Fixes : #5836
2023-05-17 12:31:16 -04:00
Matthias Clasen
e79851502c
Merge branch 'pathbar-early-return-on-cancellation' into 'main'
...
pathbar: Fail setting the path on cancellation
Closes #5792
See merge request GNOME/gtk!5982
2023-05-17 10:15:26 +00:00
Matthias Clasen
0132ab046b
Merge branch 'matthiasc/for-main' into 'main'
...
Reduce pixbuf helpers
See merge request GNOME/gtk!5984
2023-05-17 10:14:44 +00:00
Matthias Clasen
c2ba1d69a1
Rename pixbuf utils to texture utils
...
That is what this is now.
2023-05-16 22:00:08 -04:00
Matthias Clasen
847739aed7
Reduce pixbuf helpers
...
Concentrate pixbuf handling in gdkpixbufutils.c.
2023-05-16 21:56:22 -04:00
Matthias Clasen
4d66598f31
Merge branch 'matthiasc/for-main' into 'main'
...
gsk: Cosmetics
See merge request GNOME/gtk!5983
2023-05-17 00:58:48 +00:00
Matthias Clasen
2ec1bd7248
Merge branch 'gl-renderer-more-defensive' into 'main'
...
gsk: Stop setting uniforms when we are out of batches
See merge request GNOME/gtk!5981
2023-05-17 00:29:40 +00:00
Benjamin Otte
646d1a8923
Merge branch 'wip/otte/ci-emergency' into 'main'
...
CI: Actually build our code
See merge request GNOME/gtk!5980
2023-05-17 00:19:06 +00:00
Matthias Clasen
4a8a6e9f70
gsk: Don't build unused functions
...
The only caller is #if 0 ed, so don't build
these functions.
2023-05-16 20:13:57 -04:00
Matthias Clasen
0a9d25c9e8
gsk: Cosmetics
...
Get the context from the driver.
2023-05-16 20:13:57 -04:00
Matthias Clasen
188677724c
Improve test coverage for property lookup models
2023-05-16 20:13:57 -04:00
Olivier Crête
22cd3ea268
pathbar: Fail setting the path on cancellation
...
The cancellation path already clears the GCancellable, if we let it
continue, it causes a later assertion, so just exit early in this case
and hope a new path has been set.
Fixes : #5792
2023-05-17 01:10:23 +01:00
Matthias Clasen
71a231b71d
gsk: Stop setting uniforms when we are out of batches
...
When the command queue is out of batches, there is
no point in doing further work like allocating uniforms.
This helps us avoid assertions in the uniform code
that we would hit when we run out of uniform space
too.
2023-05-16 20:03:19 -04:00
Benjamin Otte
112fe06323
glrenderer: Remove unused function
...
Thanks, macos CI.
(We should have a Fedora clang build.)
2023-05-17 01:52:42 +02:00
Benjamin Otte
8bcb918de5
tests: Remove some tests
...
They are failing to build because they use deprecated functions and
nobody thinks they're worth fixing.
2023-05-17 01:24:22 +02:00
Benjamin Otte
6f6293c38c
CI: Actually build our code
...
Commit 3090795351
accidentally caused all
CI builds (or at least the ones with -Werror) to no longer build tests,
examples and demos, so none of them had made sure that they compile.
2023-05-17 00:56:23 +02:00
Matthias Clasen
1b885cc317
Merge branch 'fix-gsk-assertions' into 'main'
...
gsk: Fix a crash
See merge request GNOME/gtk!5979
2023-05-16 22:20:51 +00:00
Matthias Clasen
9dd83ab354
gsk: Fix a crash
...
When we start ignoring batches, we must do it everywhere,
or we may run into assertions. This was triggered by an
enormous text node tree produced by tests/rendernode-create.
2023-05-16 17:33:21 -04:00
Matthias Clasen
0bbc6f8932
Merge branch 'ebassi/issue-5837' into 'main'
...
Fix various compiler warnings with GCC 13
Closes #5837
See merge request GNOME/gtk!5977
2023-05-16 21:28:29 +00:00
Emmanuele Bassi
1ad4c04b2a
Replace deprecated CSS loading API
...
Use gtk_css_provider_load_from_string() when loading CSS from C
strings.
2023-05-16 16:59:05 -04:00
Emmanuele Bassi
0bbe68db0b
Implement GtkSelectionModel for GtkNotebookPages
...
The documentation says that the model returned by
gtk_notebook_get_pages() implements the GtkSelectionModel interface, but
checking the history confirms this is a lie.
Instead of fixing the documentation, we can easily make it true, and
reduce the differences between GtkNotebook and GtkStack.
Fixes : #5837
2023-05-16 16:59:05 -04:00
Emmanuele Bassi
b2a3a5e226
Fix various compiler warnings with GCC 13
...
There are various null dereference warnings in GtkListItemManager that
make the build noisy.
2023-05-16 16:59:05 -04:00
Matthias Clasen
0434ad3bd9
Merge branch 'no-deprecations-in-demos' into 'main'
...
demos: Stop using deprecated api
See merge request GNOME/gtk!5978
2023-05-16 20:51:01 +00:00
Matthias Clasen
9d3046f187
Merge branch 'matthiasc/for-main' into 'main'
...
Matthiasc/for main
See merge request GNOME/gtk!5975
2023-05-16 20:42:27 +00:00
Matthias Clasen
6b2c088a29
demos: Stop using deprecated api
...
Use texture apis instead of pixbuf ones.
2023-05-16 16:25:59 -04:00
Matthias Clasen
4efc736a6e
Merge branch 'wip/otte/for-main' into 'main'
...
gdk: Clamp frame region to surface size
Closes #5812
See merge request GNOME/gtk!5976
2023-05-16 17:25:17 +00:00
Benjamin Otte
2b0e3a5b1a
nodeparser: Move an error check
...
By putting the check earlier, it will be emitted for the right token.
2023-05-16 18:53:53 +02:00
Benjamin Otte
bac41ce644
node-editor: Print default renderer in title
...
If there is a value passed to GSK_RENDERER, display it in the window
title.
This is mostly so that when I show off screenshots, people know what
renderer I'm using.
2023-05-16 18:53:53 +02:00
Benjamin Otte
2b0ad09423
vulkan: Make projection matrix match GL
...
Vulkan has a different initial coordinate system to GL.
GL:
(-1, 1, -1) +------+.
|`. | `.
| `·--|---·
| : | :
+------+. :
`. : `.:
`·------· (1, -1, 1)
Vulkan:
(-1, -1, 0) +------+.
|`. | `.
| `·--|---·
| : | :
+------+. :
`. : `.:
`·------· (1, 1, 1)
so adjust the near and far plane we pass to
graphene_matrix_init_ortho() to make it end up with the same
projection as the GL renderer.
2023-05-16 18:53:27 +02:00
Benjamin Otte
f5955feea1
testsuite: Add crossfade-clip-both-children test
...
This one tests a crossfade between two non-overlapping nodes with a clip
region that covers neither of the two nodes.
This tests that renderers can deal with clip regions that doesn't
overlap nodes in a situation where they will most likely want to create
an offscreen.
As offscreens are typically clipped to the clip region, this would cause
an empty offscreen and that can cause failures.
2023-05-16 18:53:27 +02:00
Benjamin Otte
853e8719c6
testsuite: Add clip-translate-offscreen test
...
This was an experiment where an offscreen was translated inside an
existing clip.
Because renderers try to limit offscreens to the clip rect, this is
interesting, because they might get the translation wrong.
2023-05-16 18:53:27 +02:00
Benjamin Otte
8d528350b9
rendernode: clip when drawing shadows
...
Ensures the shadow stays small.
2023-05-16 18:53:27 +02:00
Benjamin Otte
d51c92f54d
build: Make shaders depend on their includes
...
This does not do any proper dependency tracking, it just makes every
shader depend on every include shader.
But that's good enough for now.
2023-05-16 18:53:27 +02:00
Benjamin Otte
b9bd7124c0
vulkan: Fix typo in clipping code
2023-05-16 18:53:27 +02:00
Benjamin Otte
14f67550d0
build: Add a new gcc 13 warning
...
We don't trigger it and it's a useful warning. So let's use it.
2023-05-16 18:53:27 +02:00
Benjamin Otte
ee6ef41e71
css: Remove crashy resource:// optimization
...
Using gdk_texture_new_from_resource() is not valid here because we are
not sure if the given resource is valid.
Plus, the previous optimization is no longer relevant, because we are
not using gdk_pixbuf_new_from_resource() anymore - which was what this
optimization was about before it was ported to GdkTexture.
Test attached.
2023-05-16 18:53:27 +02:00
Benjamin Otte
fde3d2cd50
testsuite: Add testcase for z clipping
...
the near and far clipping plane are at -10000 and 10000 respectively.
Test that the renderers respect that.
2023-05-16 18:53:27 +02:00
Benjamin Otte
099955b0c0
gridview: Add border-spacing where it was missed
...
We were computing column widths without taking border-spacing into
account, making them slightly too big.
2023-05-16 18:53:09 +02:00
Benjamin Otte
b530ade8c6
gdk: Clamp frame region to surface size
...
The region may be larger than the surface's size, but many rendering
APIs require the size to be clamped.
Fixes #5812
2023-05-16 18:53:09 +02:00
Matthias Clasen
3a9234dadc
Cosmetics
2023-05-16 12:33:12 -04:00
Matthias Clasen
3e27232028
Improve test coverage for sorters
2023-05-16 12:33:12 -04:00
Matthias Clasen
c2676ad785
Improve test coverage for GtkPropertyLookupListModel
2023-05-16 12:33:12 -04:00
Matthias Clasen
4a1598dc2a
Merge branch 'fix-property-lookup-model' into 'main'
...
Fix a few bugs in GtkPropertyLookupListModel
See merge request GNOME/gtk!5974
2023-05-16 16:31:35 +00:00
Matthias Clasen
5f70b00bea
Fix a few bugs in GtkPropertyLookupListModel
...
Fix bugs in property types.
2023-05-16 12:00:08 -04:00
Matthias Clasen
3377460fb8
Merge branch 'matthiasc/for-main' into 'main'
...
gdk: Drop some unused private api
See merge request GNOME/gtk!5973
2023-05-16 12:48:40 +00:00
Matthias Clasen
05a0aca5ab
Improve test coverage for GtkStringSorter
2023-05-15 23:21:06 -04:00
Matthias Clasen
9463e0f56c
Only build iconcache validator if it is used
2023-05-15 23:06:07 -04:00
Matthias Clasen
1c308431a6
Drop unneeded exports from gdkpixbufutils.c
2023-05-15 23:05:52 -04:00
Matthias Clasen
fb996f6e6d
Drop an unused include
2023-05-15 23:05:52 -04:00
Matthias Clasen
edfd37dfe2
docs: Mention pixbufs in the migration guide
2023-05-15 23:05:52 -04:00
Matthias Clasen
4bede73f62
Deprecate from-pixbuf apis for widgets
...
We want to drop GdkPixbuf from our apis.
These have easy replacements already, so
lets deprecate them.
2023-05-15 23:05:52 -04:00
Matthias Clasen
0b59290bad
gdk: Drop some unused private api
2023-05-15 20:30:38 -04:00
Matthias Clasen
e8c7d0e5ec
Merge branch 'wip/corey/filesystemmodel' into 'main'
...
filesystemmodel: Ignore changes on the parent directory
Closes #4233
See merge request GNOME/gtk!5970
2023-05-16 00:09:56 +00:00
Matthias Clasen
3fb06ca29d
Merge branch 'matthiasc/for-main' into 'main'
...
tools: Cosmetics
See merge request GNOME/gtk!5972
2023-05-16 00:02:15 +00:00
Matthias Clasen
013401b594
Fix texture tests with GLES
...
No sync for you if you're using GLES.
2023-05-15 19:11:35 -04:00
Matthias Clasen
484c4bdf22
Merge branch 'deprecate-pixbuf-apis' into 'main'
...
gdk: Deprecated some pixbuf apis
See merge request GNOME/gtk!5971
2023-05-15 23:03:42 +00:00
Corey Berla
133231e12b
filesystemmodel: Ignore changes on the parent directory
...
The filesystemmodel tracks changes and additions to child files
through G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGED. This event will also
occur if the parent directory is changed. Since the parent directory
doesn't exist in the model, it creates a non-existent item.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/4233
2023-05-15 15:50:40 -07:00
Corey Berla
ef2024736d
filechooserwidget: Stop leaking file system models
2023-05-15 15:50:32 -07:00
Matthias Clasen
ed265f6a7e
gdk: Deprecated some pixbuf apis
...
These are already documented as 'don't use
in new apis'. Lets make it official and
deprecate them properly.
2023-05-15 18:22:37 -04:00
Matthias Clasen
0152286fa0
Improve test coverage for GdkGLContext
2023-05-15 16:49:12 -04:00
Corey Berla
4ef560d3b8
.gitignore: Ignore .flatpak-builder directory
2023-05-15 13:08:56 -07:00
Matthias Clasen
343472931d
Cosmetics
...
Linkify a reference.
2023-05-15 15:25:11 -04:00
Matthias Clasen
41b606b16d
Add tests for GdkTextureDownloader
2023-05-15 15:24:56 -04:00
Matthias Clasen
f83c00c928
Test gltexture update functionality
2023-05-15 12:50:28 -04:00
Matthias Clasen
f497cb2b6e
Improve gdk test coverage
2023-05-15 11:56:31 -04:00
Matthias Clasen
2f8c0b7aec
tools: Cosmetics
...
Make gtk-builder-tool screenshot be quiet unless
it had to make up a filename. And tweak --help
output a bit.
2023-05-15 08:03:20 -04:00
Matthias Clasen
d517b25ea3
Merge branch 'export-handles-properly' into 'main'
...
Add testfilelauncher
See merge request GNOME/gtk!5968
2023-05-15 10:12:29 +00:00
Matthias Clasen
37345670c8
Add testfilelauncher
...
This is a test to use GtkFileLauncher a bit
more intensively than usual.
2023-05-15 00:20:24 -04:00
Matthias Clasen
89d993b6ec
wayland: Try harder to be compatible
...
We can keep the old unexport_handle api working
in the case that there is only a single exported
handle.
2023-05-15 00:20:24 -04:00
Matthias Clasen
250a5c0dfd
Deprecate gdk_wayland_toplevel_unexport_handle
...
It doesn't do anything anymore, and is no longer
used internally. The replacement is
gdk_wayland_toplevel_drop_exported_handled().
2023-05-15 00:20:24 -04:00
Matthias Clasen
af3ceb5755
wayland: Reimplement exporting
...
Change things so that every call to export_handle
creates a new handle, and unexport_handle destroys
the handle that it is given.
2023-05-14 23:49:44 -04:00
Matthias Clasen
982a696311
wayland: Give toplevels a destroy hook
...
We will need to do some cleanup before the
wl_surface is destroyed, so add a hook for that.
2023-05-14 23:49:44 -04:00
Matthias Clasen
e5f1e4545d
gdk: Change the private export handle api
...
Make unexport_handle take the handle, so we
can in the future deal with multiple exports.
Update the one caller in gtkwindow.c to pass
the handle.
2023-05-14 23:49:44 -04:00
Matthias Clasen
bf87a40b20
wayland: Add new backend api
...
Add an alternative to unexport_handle that
does take the handle.
2023-05-14 23:49:44 -04:00
Matthias Clasen
18b8baaf25
Merge branch 'input-doc-fixes' into 'main'
...
GTK reference docs: Some fixes
See merge request GNOME/gtk!5969
2023-05-14 21:49:10 +00:00
Matthias Clasen
4c69192837
gtk: Change the private export handle api
...
Make unexport_handle take the handle, which will
let us deal with multiple exports in the future.
Update all callers to store their handle, and
pass it to unexport_handle.
2023-05-14 17:19:45 -04:00
FeRD (Frank Dana)
c01be6cac7
doc/actions: Fix end-of-file :
...
The actions document ended with a : where there used to be a period,
seemingly a bug in the conversion from XML. Replace that : with a
period, and remove another spurious : inserted during the conversion.
2023-05-14 17:01:38 -04:00
FeRD (Frank Dana)
8b4e7a638c
docs/input: <kbd>␣</kbd> => <kbd>Space</kbd>
...
- Switch to semantic newlines, where adding <kbd> caused wrapped text
to grow wider than 80 characters on some lines.
2023-05-14 16:23:41 -04:00
FeRD (Frank Dana)
59acec21d4
docs/input-handling: A few more <kbd> wrappings
...
- Format a few missed keypresses/combos using <kbd>
- Switch to semantic newlines for those (paragraphs, bullet points)
2023-05-14 16:20:33 -04:00
Matthias Clasen
38f610f85e
Fix a typo
2023-05-14 13:26:14 -04:00
Matthias Clasen
5393173afa
wayland: Remove some unused fields
2023-05-14 13:06:00 -04:00
Matthias Clasen
951b448e90
Merge branch 'matthiasc/for-main' into 'main'
...
Add a README to examples/hello
See merge request GNOME/gtk!5967
2023-05-14 16:58:44 +00:00
Matthias Clasen
51ad2a55a8
gdk: Add an assertion
...
We simply overwrite any previous region,
so assert that the field was NULL before.
2023-05-14 07:50:11 -04:00
Matthias Clasen
e50209a535
Add more texture load tests
...
Add some tests for handling of failures.
The test data here is taking from gdk-pixbufs
tests/test-images/fail directory, excluding anything
but png, tiff and jpg images.
2023-05-14 07:50:11 -04:00
Matthias Clasen
d6430995ad
Improve gdk test coverage
...
Test the loadable icon implementation of GdkTexture.
2023-05-14 07:50:11 -04:00
FeRD (Frank Dana)
9b1026886b
docs/input-handling: Don't leave reader hanging
...
Strangely, the document's last sentence ended with a colon,
giving the impression there's missing text that should follow.
There is not.
Even more strange, it's _always_ ended with a colon,
ever since the file was converted from XML
(in commit 10cd539104
).
BUT, the XML file it was converted _from_ ended that same sentence
with a period! I have no idea where the colon came from.
2023-05-14 05:29:18 -04:00
Matthias Clasen
cea15fc63e
Improve gdk test coverage
...
Add tests for GdkToplevvelLayout and
GdkPopupLayout.
2023-05-13 21:56:29 -04:00
Matthias Clasen
f99fbab24f
docs: Mention the current build options
...
Some of these got renamed recently.
2023-05-13 21:56:29 -04:00
Matthias Clasen
6acd4361ab
ci: Stop using deprecated build options
...
demos got renamed to build-demos.
2023-05-13 21:56:29 -04:00
Matthias Clasen
05f488011a
Add a README to examples/hello
...
Just so nobody wonders why there's a meson.build
in this subdirectory.
2023-05-13 21:56:29 -04:00
Georges Basile Stavracas Neto
ef7679235a
Merge branch 'revert-78f68d79' into 'main'
...
Revert "Merge branch 'gbsneto/css-parser-annotation' into 'main'"
See merge request GNOME/gtk!5965
2023-05-14 00:37:47 +00:00
Matthias Clasen
d65f9b298c
Merge branch 'new-css-load-apis' into 'main'
...
Add new css provider load apis
See merge request GNOME/gtk!5966
2023-05-14 00:27:23 +00:00
Matthias Clasen
5c9de08159
Deprecate gtk_css_provider_load_From_data
2023-05-13 20:00:36 -04:00
Matthias Clasen
f2a297f56d
Stop using gtk_css_provider_load_from_data
2023-05-13 19:59:17 -04:00
Matthias Clasen
a1d9cb8ad6
Add new css provider load apis
...
gtk_css_provider_load_from_data has turned out
to be problematic for language bindings. Add two
new variants, from_string and from_bytes, to
replace it.
2023-05-13 19:46:29 -04:00
Emmanuele Bassi
8da911db81
Revert "Merge branch 'gbsneto/css-parser-annotation' into 'main'"
...
This reverts merge request !5964
2023-05-13 21:53:04 +00:00
Georges Basile Stavracas Neto
78f68d7992
Merge branch 'gbsneto/css-parser-annotation' into 'main'
...
gtk/css-provider: Add back array length annotation
See merge request GNOME/gtk!5964
2023-05-13 20:51:00 +00:00
Georges Basile Stavracas Neto
8a190b200b
gtk/css-provider: Add back array length annotation
...
This partially reverts commit 93a875bf20
.
Removing this annotation broke bindings, which now treat the
length of the array as a standalone parameter.
This broke Spiel, and probably other non-C apps that rely on
GtkCssProvider through bindings.
2023-05-13 17:18:21 -03:00
Matthias Clasen
e72b4ae6e2
Merge branch 'more-marshaller-cleanup' into 'main'
...
Add missing va marshallers
See merge request GNOME/gtk!5963
2023-05-13 19:46:30 +00:00
Daniel Boles
9f1f4850fe
Widget: Fix doubled word need, missing possessives
2023-05-13 18:17:17 +01:00
Matthias Clasen
0b9e5e6db4
Drop duplication between marshallers
...
gtk and gdk have their own marshallers, for historic
reasons. But there's no reason to duplicate the same
code here.
Eventually, we should just move all marshallers to
the same place.
2023-05-13 12:50:45 -04:00
Matthias Clasen
2cd5b4df1b
Add missing va marshallers
...
Whenever we pass a marshaller to g_signal_new,
call g_signal_set_va_marshaller with the corresponding
va marshaller.
2023-05-13 12:38:24 -04:00
Matthias Clasen
57a070fc8d
Merge branch 'marshaller-cleanup' into 'main'
...
Avoid generic marshallers
See merge request GNOME/gtk!5962
2023-05-13 15:35:14 +00:00
Matthias Clasen
ccc6b7165e
Drop unused marshallers
...
This list was found by a combination of
grep, sed, and sort.
2023-05-13 11:15:49 -04:00
Matthias Clasen
ff330668cf
Avoid generic marshallers
...
The libffi-based generic marshallers give sysprof
difficulties in getting good stacktraces, so avoid
them.
2023-05-13 11:15:49 -04:00
Matthias Clasen
63f9e5453d
Merge branch 'matthiasc/for-main' into 'main'
...
popover: Stop making assumptions about corners
See merge request GNOME/gtk!5961
2023-05-13 12:40:35 +00:00
Matthias Clasen
f849823a07
popover: Stop making assumptions about corners
...
The popover tail drawing code was just assuming that
the corner values are numbers. Which they won't, anymore.
2023-05-13 07:36:35 -04:00
Matthias Clasen
9a2d6d6d88
Improve css parser test coverage
2023-05-13 07:36:28 -04:00
Matthias Clasen
72c37d566c
Merge branch 'matthiasc/for-main' into 'main'
...
css: Fix transition of font features
See merge request GNOME/gtk!5957
2023-05-13 02:02:48 +00:00
Matthias Clasen
01c0d5e04b
Merge branch 'volumemedia' into 'main'
...
mediacontrols: Set valign=center on volume button
See merge request GNOME/gtk!5955
2023-05-13 01:43:59 +00:00
Matthias Clasen
57dd88ee53
testsuite: Cosmetics
2023-05-12 19:52:42 -04:00
Matthias Clasen
8c92c619de
Test the deprecation support
...
Test gtk4-builder-tool validate --deprecations
2023-05-12 19:52:42 -04:00
Matthias Clasen
78d2002965
Add tests for gtk4-builder-tool enumerate
2023-05-12 19:52:42 -04:00
Matthias Clasen
25c4acb6d2
Add tests for hsv<>rgb conversion
2023-05-12 19:52:42 -04:00
Matthias Clasen
0a3dac10c6
Improve test coverage for the css parser
2023-05-12 19:52:42 -04:00
Matthias Clasen
c9afcd31c2
css: Improve transition test coverage
2023-05-12 19:52:42 -04:00
Matthias Clasen
3565facdaf
css: Fix initial rotate transform value
2023-05-12 19:52:42 -04:00
Matthias Clasen
494cff94d6
css: Make some corner values static
...
Provide static value for uniform corners
with lengths from 0 to 8px. This covers
the majority of corners in widget-factory.
2023-05-12 15:00:13 -04:00
Matthias Clasen
17644b12a5
css: More static length values
...
Make all length values from 0px to 8px available
as static values. This will help with cutting
down on the number of corner values (we have a
lot of 5px corners).
2023-05-12 14:50:02 -04:00
Matthias Clasen
54ff5d8edd
Revert "css: Simplify default values"
...
This reverts commit 1efa39672b
.
We want to use corner values for corner properties.
2023-05-12 14:50:02 -04:00
Matthias Clasen
b18320fe05
Revert "csscornervalue: Accept other values if x == y"
...
This reverts commit 1f2f2777e1
.
It broke transitioning of corner values.
2023-05-12 14:50:02 -04:00
Jordi Mas
0ce60ad214
Update Catalan translation
2023-05-12 19:42:35 +02:00
Matthias Clasen
76642f2bf9
css: Correct initial shadow filter values
...
This was using numbers instead of lengths,
causing confusion in the transition code.
2023-05-12 13:15:35 -04:00
Guillaume Bernard
fcac150641
Update French translation
2023-05-12 13:24:14 +00:00
Matthias Clasen
4d13c61aaf
css: Fix transition of font features
...
If we store ints as values, we better use
g_hash_table_lookup_extended, or zeros will
show up as missing values.
2023-05-12 09:13:00 -04:00
Matthias Clasen
09bab2b2df
Improve css parser test coverage
2023-05-12 08:38:39 -04:00
Maximiliano Sandoval R
b44f43e996
mediacontrols: Set valign=center on volume button
...
To match the play button.
2023-05-12 11:35:53 +02:00
Daniel Boles
52fa641dff
Overlay: Add minimal doc blurb for property :child
2023-05-12 10:30:37 +01:00
Matthias Clasen
a3ebc0329d
Improve test coverage for list models
2023-05-11 23:24:23 -04:00
Matthias Clasen
8dc04d3fc8
Merge branch 'matthiasc/for-main' into 'main'
...
Add a little wait to focus tests
See merge request GNOME/gtk!5954
2023-05-12 02:41:26 +00:00
Matthias Clasen
ba64e5588d
Add a little wait to focus tests
...
I don't know exactly why, but this seems
to help the tests not fail on X11.
2023-05-11 22:24:10 -04:00
Matthias Clasen
fcdcdb7e78
Merge branch 'matthiasc/for-main' into 'main'
...
ci: Use the same options for the scan-build job
See merge request GNOME/gtk!5953
2023-05-12 02:08:37 +00:00
Matthias Clasen
3d5789a66e
Merge branch 'validate-uris' into 'main'
...
urilauncher: Validate the uri
Closes #5829
See merge request GNOME/gtk!5952
2023-05-12 00:19:07 +00:00
Matthias Clasen
59343e4efb
gtk-demo: Rename the new Settings demo
...
"v2" does not look great in the sidebar.
Lets call this "Alternative Settings".
2023-05-11 20:14:58 -04:00
Matthias Clasen
41219ae489
gtk-demo: Fix a typo
2023-05-11 19:53:42 -04:00
Matthias Clasen
7055250692
ci: Stop special-casing broadway
...
We are not running the broadway tests anymore,
so no need to special-case them in the run-test.sh
script either.
2023-05-11 19:53:03 -04:00
Matthias Clasen
98f63d09c0
ci: Use the same options for the scan-build job
...
In particular, not building the tests should
help cutting down on time spent linking.
2023-05-11 19:53:03 -04:00
Matthias Clasen
85b9a6f1b0
urilauncher: Validate the uri
...
We don't want to send nonsense to the portal.
Fixes : #5829
2023-05-11 18:34:26 -04:00
Matthias Clasen
3353eac289
Merge branch 'fix-focus-tests' into 'main'
...
spinbutton: Update baseline child
See merge request GNOME/gtk!5950
2023-05-11 22:28:46 +00:00
Matthias Clasen
cdc135f11d
Merge branch 'shortcuts-focus' into 'main'
...
theme: Show focus in shortcuts windows
See merge request GNOME/gtk!5951
2023-05-11 20:16:07 +00:00
Matthias Clasen
069ce48ac5
theme: Show focus in shortcuts windows
...
The individual items are now focusable,
so we need to show a focus ring, otherwise
this is just confusing.
2023-05-11 15:58:15 -04:00
Matthias Clasen
625c7c3d26
widgetfocus: Sort children better for TAB
...
When tabbing in a box, we really want to sort
children just along the main axis. Make it so.
2023-05-11 15:35:27 -04:00
Matthias Clasen
4ea2aac561
spinbutton: Update baseline child
...
When the orientation changes, the entry changes
position, so we need to update baseline-child to match.
2023-05-11 15:34:44 -04:00
Matthias Clasen
e88e31dde2
Merge branch 'balance-ci-jobs' into 'main'
...
ci: Balance the work between jobs
See merge request GNOME/gtk!5949
2023-05-11 13:47:56 +00:00
Matthias Clasen
fb2e67638d
testsuite: Simplify shader test
...
Simplify the shader to something GLES
will successfully compile.
2023-05-11 09:20:25 -04:00
Matthias Clasen
f11dd83ab5
Merge branch 'matthiasc/for-main' into 'main'
...
gsk: Dispose the driver when the display is closed
See merge request GNOME/gtk!5948
2023-05-11 13:11:56 +00:00
Matthias Clasen
92804b5b55
Drop the duplicate x11 testsuite run
...
We currently run the testsuite against x11 in both
the debug and release builds. Once ought to
be enough.
2023-05-11 08:52:48 -04:00
Matthias Clasen
87e7ea6080
ci: Balance the work between jobs
...
The fedora-x86-64 build does not only build with debug,
it also does the hello build, and it runs the testsuite
multiple times.
Move the hello build to the fedora release build. The idea
is that this lets us do more work in parallel, and spend
less time waiting for the longest-running ci job.
2023-05-11 08:39:38 -04:00
Matthias Clasen
b1945b38e8
ci: Drop the broadway test run
...
We are ignoring failures here, and nobody is working
on fixing them. And the failures end up at the end
of the log, adding annoyance to finding the actual
failures.
2023-05-11 08:34:14 -04:00
Matthias Clasen
13ca3187f2
testsuite: fix another surface unref warning
2023-05-11 06:40:57 -04:00
Matthias Clasen
18fd506360
build: Cosmetics
2023-05-11 06:13:42 -04:00
Matthias Clasen
9faf1a0377
gsk: Comment out some debug code
...
The calls of these functions are #ifdef'ed out,
so no point in compiling these functions.
2023-05-11 06:13:42 -04:00
Matthias Clasen
1a9c03449e
gtk: Don't drop too many references
...
We only have one reference to the surface,
and it is dropped by gdk_surface_destroy.
All the users of surfaces in gtk had the same
bug: they were all stealing an extra reference
to drop - the one that the renderer was leaking
until recently.
2023-05-11 06:13:03 -04:00
Matthias Clasen
aee214b09d
gsk: Fix some renderer gotchas
...
unrealize() needs to clean up the surface that was set
in realize(), and both need to emit property change
notification.
2023-05-10 20:21:54 -04:00
Matthias Clasen
dc3003bc4d
gsk: Improve test coverage
...
Add more tests for gsk transforms, render node
and renderer apis.
2023-05-10 20:21:31 -04:00
Matthias Clasen
845f4b1536
gsk: Drop an unused function
2023-05-10 20:21:12 -04:00
Matthias Clasen
abbb3a2da6
testsuite: Close displays in the gsk tests
...
This gives us better coverage of the dispose
codepath for a driver that has actually been
used.
2023-05-10 20:21:12 -04:00
Matthias Clasen
1a93efecf3
gsk: Dispose the driver when the display is closed
...
This was the intention, but the object data by itself
does not achieve that: We do run dispose on the display
when it is closed, but object data is only cleared in
finalize. So listen to the ::closed signal and remove
the driver ourselves.
Fix up the drivers dispose implementation enough for
that to actually work.
2023-05-10 20:21:12 -04:00
Matthias Clasen
440d56a44f
Use gsk_matrix_transform_point3d consistently
2023-05-10 20:21:12 -04:00
Matthias Clasen
f10603e97d
Merge branch 'matthiasc/for-main' into 'main'
...
tests: Stop copying the tool tests
See merge request GNOME/gtk!5947
2023-05-10 10:38:07 +00:00
Matthias Clasen
9a9257d7be
tests: Don't disable vertex arrays
...
It doesn't work, and that makes tests fail.
2023-05-09 23:02:48 -04:00
Matthias Clasen
5c10f2b4cd
Improve coverage for half-float fallbacks
2023-05-09 23:02:30 -04:00
Matthias Clasen
ba6a618d44
build: Rename another option
2023-05-09 21:41:27 -04:00
Matthias Clasen
5fbeea3870
build: Deprecate an option
...
Rename the demos option to build-demos, to match
the other options for building optional parts.
2023-05-09 21:34:05 -04:00
Matthias Clasen
27368a418a
build: Require meson 0.63
...
This is needed for option deprecation.
2023-05-09 21:34:05 -04:00
Matthias Clasen
676cd1e673
tests: Stop copying the tool tests
...
No point in doing that, and the meson feature
we are using here is deprecated.
2023-05-09 21:21:39 -04:00
Matthias Clasen
d6a4c65bfa
Post-release version bump
2023-05-09 20:48:33 -04:00
Matthias Clasen
4695f583c1
4.11.2
2023-05-09 20:46:21 -04:00
Matthias Clasen
fa88d738dc
Update baseline docs a bit
2023-05-09 18:59:11 -04:00
Matthias Clasen
7841248c1d
Merge branch 'deprecate-align-value' into 'main'
...
Deprecate GTK_ALIGN_BASELINE
See merge request GNOME/gtk!5946
2023-05-09 20:53:59 +00:00
Matthias Clasen
ef5f34c985
Update tests
2023-05-09 16:36:07 -04:00
Matthias Clasen
1dfa54c117
Deprecate GTK_ALIGN_BASELINE
...
We can deprecated enum values now.
2023-05-09 14:28:26 -04:00
Matthias Clasen
ff920d98ec
Use GTK_ALIGN_BASELINE_FILL
...
Replace GTK_ALIGN_BASELINE with its new name
everywhere.
2023-05-09 14:28:26 -04:00
Matthias Clasen
91ca6d0851
Merge branch 'wip/ebassi/gen-version-macros' into 'main'
...
Generate version and deprecation macros at build time
See merge request GNOME/gtk!5945
2023-05-09 18:23:40 +00:00
Emmanuele Bassi
cdeeb3275a
build: Internal tests must set GTK_COMPILATION
...
Otherwise they won't be able to use the appropriate function visibility
on Windows.
2023-05-09 19:01:21 +01:00
Emmanuele Bassi
9d68bebdd1
Minimize the amount of inclusions in public headers
...
Public headers should mainly include gdktypes.h, which already include
the symbol visibility and versioning macros; we can also modify
gdktypes.h to include the enumerations.
2023-05-09 17:36:59 +01:00
Matthias Clasen
526ddfa866
Merge branch 'wip/otte/sections' into 'main'
...
Add GtkSectionModel
See merge request GNOME/gtk!5818
2023-05-09 16:36:55 +00:00
Matthias Clasen
d7b9d35c02
Use #pragma once
...
We switched over to using #pragma once, so lets
use it consistently, in generated headers as well.
2023-05-09 16:43:35 +01:00
Matthias Clasen
383c404792
Drop the gdk/gdkversionmacros.h header
...
It was just added to avoid touching too many files.
Touching them now.
2023-05-09 16:43:35 +01:00
Emmanuele Bassi
33d0cfd4f8
demos: Drop symbol visibility macros from demo types
...
Since the corresponding source files do not include "config.h", and are
not compiled with `GTK_COMPILATION`, they will generate the wrong symbol
exporting under Windows.
2023-05-09 16:43:35 +01:00
Emmanuele Bassi
43311f3a80
build: Minor style nitpicks
2023-05-09 16:43:35 +01:00
Emmanuele Bassi
265bc90524
build: Use Meson's gnu_symbol_visibility
...
Instead of injecting `-fvisibility=hidden` depending on a compiler check
ourselves, let Meson do it for us.
This also avoids us having to filter `-fvisibility=hidden` when reusing
the common compiler flags.
2023-05-09 16:43:25 +01:00
Matthias Clasen
197d921347
Add a missing file
2023-05-09 16:43:25 +01:00
Matthias Clasen
3d5529760a
Fix install location
2023-05-09 16:43:25 +01:00
Matthias Clasen
3a2c4be44b
Use GTK_COMPILATION throughout
...
It is a bit ugly that it doesn't fit the neat
namespace schema, but it is what we use everywhere.
2023-05-09 16:43:25 +01:00
Matthias Clasen
e216f469a1
Don't excessively define GDK_EXTERN
...
Once is enough.
2023-05-09 16:43:25 +01:00
Matthias Clasen
5ae25519a7
Make it build
...
Fix the circular dependency by moving the generated
headers to gdk/version/, and build that directory
first.
Misc other fixes, such as putting the custom targets
as sources, not depedencies, and using the correct
major version in the generator script.
2023-05-09 16:43:25 +01:00
Emmanuele Bassi
4d1f7a476d
Generate version and deprecation macros at build time
...
Let's poach the same script used by GLib to avoid having to add all the
version macros by hand every time we increment the GTK version.
This is a work in progress:
- need to rename the GLIB_STATIC_COMPILATION check
- circular dependency: libgtkcss depends on gdkversionmacros.h, but libgdk
depends on libgtkcss
2023-05-09 16:43:25 +01:00
Benjamin Otte
a959fba18a
Merge branch 'wip/otte/no-vsync' into 'main'
...
Add GDK_DEBUG=no-vsync
See merge request GNOME/gtk!5944
2023-05-09 15:16:43 +00:00
Benjamin Otte
c88ac79437
listview: Make inertness not depend on factory
...
The inertness concept introduced in 62e9d1e470
assumed a listview was
inert when no factory was set. This has 2 problems:
1. columnview uses a listview without factories.
2. header factory being set but factory not being set technically makes
the listiew inert - but should it?
So for now, make inertness only depend on visibility and root.
A side benefit is that this matches columnview semantics.
2023-05-09 17:03:35 +02:00
Benjamin Otte
ddefbfa8b5
gtk-demo: Add alternative settings demo
...
This one displays a long list of all settings with sections and allows
filtering the list to quickly search for keys.
2023-05-09 17:03:35 +02:00
Benjamin Otte
435a405c55
gtk-demo: Split out code from the settings demo
...
I want to add another demo using settings and share relevant code.
2023-05-09 17:01:20 +02:00
Benjamin Otte
e1ed9f10c6
theme: Add some random CSS for section headers
2023-05-09 17:00:40 +02:00
Benjamin Otte
46adfbef4f
listitemmanager: Create header items for sections
...
Now, finally, listitemmanager has all the necessary support to make
section headers work.
2023-05-09 17:00:40 +02:00
Benjamin Otte
53bfcf7f0a
listview: GtkListHeader and gtk_list_view_set_header_factory()
...
Adds infrastructure for handling factories for list headers.
For now, listitemmanager doesn't instantiate them, so they aren't used.
2023-05-09 17:00:40 +02:00
Benjamin Otte
76d601631d
listitemmanager: Add GtkListItemChange
...
... for tracking widgets during changes.
This just pulls all the different disjointed parts into one struct with
a sensible API.
2023-05-09 17:00:40 +02:00
Benjamin Otte
38844fef4d
listitemmanager: Add GtkListHeaderBase and vfuncs
...
This is plumbing for section handling.
The vfuncs don't do anything, this is just the infrastructure.
2023-05-09 17:00:40 +02:00
Benjamin Otte
03ac6611c1
listitembase: exit early
...
When update() is called but no values are changed, exit early.
2023-05-09 17:00:40 +02:00
Benjamin Otte
0ff88346cd
listitemmanager: Make sections configurable
...
Add a gtk_list_item_manager_set_has_sections() (default: FALSE) that
requires explicit turning on for the listitemmanager to gain section
support.
2023-05-09 17:00:40 +02:00
Benjamin Otte
a73256e5c9
listitemmanager: Add/remove sections as needed
...
When ensuring widgets, ensure that their section is known. This will
be relevant when we use section widgets.
Also ensure that sections that don't cover any widget get destroyed.
2023-05-09 17:00:40 +02:00
Benjamin Otte
5d2605a151
testsuite: assert widgets are in matched sections
...
All widgets that we display should have their sections known, so assert
that that is the case.
2023-05-09 17:00:40 +02:00
Benjamin Otte
40a7ec73a9
testsuite: Add a print function for the listitemmanager
...
This is very useful when debugging.
2023-05-09 17:00:40 +02:00
Benjamin Otte
ccbe762103
listitemmanager: Add gtk_list_tile_get_next_skip()
...
... and gtk_list_tile_get_previous_skip() and use them.
Allows skipping over REMOVED and FILLER tiles which makes the code a lot
more readable.
2023-05-09 17:00:40 +02:00
Benjamin Otte
88d5c9a5e1
listitemmanager: Add gtk_list_tile_set_type()
2023-05-09 17:00:39 +02:00
Benjamin Otte
6df8eafc3a
testsuite: Add verbose output to listitemmanager test
2023-05-09 17:00:39 +02:00
Benjamin Otte
8e69c5c89c
listitemmanager: Properly handle sections during add/remove
...
We don't insert sections ourselves yet, but we handle the existing one
when items get added or removed.
2023-05-09 17:00:39 +02:00
Benjamin Otte
8bf6498265
listitemmanager: Augment header/footer info
2023-05-09 17:00:39 +02:00
Benjamin Otte
e680abc723
listitemmanager: Add section tiles
...
For now, we just have a HEADER at the start and a FOOTER at the end.
That's hard enough to get right.
2023-05-09 17:00:39 +02:00
Benjamin Otte
cecaede610
testsuite: Improve listitemmanager test
...
It now has trackers!
2023-05-09 17:00:39 +02:00
Benjamin Otte
81e7e67cef
listitemmanager: Add tile types
...
We have a FILLER and a REMOVED type now.
Also makes gc() more sensitive to types.
2023-05-09 17:00:39 +02:00
Benjamin Otte
35543f60d9
listitemmanager: Add a type to tiles
...
There's only one type for now, but hey, you have to start somewhere.
2023-05-09 17:00:39 +02:00
Benjamin Otte
7856c52882
testsuite: Add tests for sections to filterlistmodel
2023-05-09 17:00:39 +02:00
Matthias Clasen
568023e6e6
Add a test for filterlistmodel sections
2023-05-09 17:00:39 +02:00
Matthias Clasen
cabb2625f5
filterlistmodel: Support sections
...
Propagate sections from the child model to
the filter model.
2023-05-09 17:00:39 +02:00
Benjamin Otte
5f64f1c8df
sortlistmodel: add a fast path for get_section()
2023-05-09 17:00:39 +02:00
Benjamin Otte
41faddea40
testsuite: Add section tests to sortlistmodel test
2023-05-09 17:00:39 +02:00
Matthias Clasen
a09146df5a
Add a test for sortlistmodel sections
2023-05-09 17:00:39 +02:00
Benjamin Otte
bd7ee3f3e1
sortlistmodel: Implement GtkSectionModel
...
The get_section() implementation is a slow and steady implementation
that has to be careful to not screw up when an incremental sort is only
partially sorted.
2023-05-09 17:00:39 +02:00
Benjamin Otte
ff6c5ad710
flattenlistmodel: Implement GtkSectionModel
...
Each child model is reported as one section.
2023-05-09 17:00:39 +02:00
Benjamin Otte
bd999c72c9
Implement GtkSectionModel for all selection models
2023-05-09 17:00:39 +02:00
Benjamin Otte
45c9e7aff4
Add GtkSectionModel
...
Prototyping the interface to be used for sections in listview, so people
can review and play with it.
2023-05-09 17:00:39 +02:00
Benjamin Otte
d24291db98
testsuite: Add a listitemmanager test
2023-05-09 17:00:39 +02:00
Matthias Clasen
661022f2eb
Merge branch 'reftest-msvc' into 'main'
...
reftest-snapshot.c: Fix running reftests on Visual Studio
See merge request GNOME/gtk!5937
2023-05-09 14:48:18 +00:00
Matthias Clasen
168eb941a1
Merge branch 'inspect-a11y-bounds' into 'main'
...
Inspector accessibility pane improvements
See merge request GNOME/gtk!5941
2023-05-09 14:47:51 +00:00
Benjamin Otte
961a6c12ec
wayland: Don't assert when requesting another frame
...
When GDK_DEBUG=no-vsync is on, we might have more than one outstanding
frame. Don't assert when that hapens. Just request a frame callback for
the first and skip the others.
2023-05-09 16:29:41 +02:00
Benjamin Otte
c227493c65
frameclock: Keep more history
...
Not all frames get timing info with GDK_DEBUG=no-vsync, so make sure
that even when we render tons of frames, the one frame that does get
timing info is still there when the timing info arrives.
I set it to 128 from 16 now.
This is roughly good enough to go to 5000fps from on a 60Hz monitor.
2023-05-09 16:29:41 +02:00
Benjamin Otte
30acf00bf8
gtk-demo: Update fps with higher priority
...
We want to make sure to always update it, so make sure it has a higher
priority than redraws.
2023-05-09 16:29:41 +02:00
Benjamin Otte
02e2a6f311
gdk: Add GDK_DEBUG=no-vsync
...
That turns off waiting and freezing in the frame clock and in
surfaces and triggers redraws asap.
2023-05-09 16:29:41 +02:00
Benjamin Otte
fa42e02a76
frameclock: Add gdk_frame_clock_idle_is_frozen()
...
This is in preparation for a future commit.
Also turn some macros into inline functions and pass the clock instead
of its priv pointer.
2023-05-09 16:29:37 +02:00
Matthias Clasen
c85b3a8d35
Merge branch 'fix-wgl' into 'main'
...
Few fixes for WGL after recent updates
Closes #5808
See merge request GNOME/gtk!5936
2023-05-09 12:51:29 +00:00
Matthias Clasen
285685044f
Merge branch 'fix-gsk-crash' into 'main'
...
Fix a refcounting mishap in gsk
Closes #5823
See merge request GNOME/gtk!5943
2023-05-09 11:29:11 +00:00
Matthias Clasen
97bc4f77c6
gsk: Fix a refcounting mishap
...
This may fix #5823
2023-05-09 06:56:09 -04:00
Chun-wei Fan
0073ee29da
gdkglcontext-win32-wgl.c: Always request alpha bits
...
...when we are using wglChoosePixelFormatARHB(). This ensures that we
hvae a HDC with a pixel format that will really support alpha bits, as
we did for the traditional ChoosePixelFormat().
Thanks to Patrick Zacharias for testing and pointing things out.
2023-05-09 18:15:23 +08:00
Benjamin Otte
e9ed5e21ef
win32: Turn off multisampling
...
We know we draw beautiful Windows, but drawing them once is totally
enough.
2023-05-09 18:15:23 +08:00
Benjamin Otte
c37786af36
win32: Actually increase the counter
...
We were sending random junk to ChoosePixelFormat().
Also assert that we don't overflow the array. That might be usefu to
know if we carelessly add attributes later.
2023-05-09 18:15:23 +08:00
Chun-wei Fan
a7b09e19f1
GDK/Win32: Use dummy WGL contexts more
...
... for creating the actual WGL contexts, so that we can cut down on the
number of times where we need to create the base, legacy WGL contexts in
order to create the WGL contexts with attributes. We could just use the
dummy context that we have to make it current to create the needed
WGL contexts.
2023-05-09 18:15:23 +08:00
Chun-wei Fan
50ef36d387
gdkglcontext-win32-wgl.c: Fix using wglChoosePixelFormatARB()
...
If we are querying the best supported pixel format for our HDC via
wglChoosePixelFormatARB() (i.e. we have the WGL_ARB_pixel_format extension),
it may return a pixel format that is different from the pixel format that we
used for the dummy context that we have setup, in order to, well, run
wglChoosePixelFormatARB(), which sadly requires a WGL context (HGLRC) to be
current in order to use it, which means the dummy HDC already has a pixel
format that has been set (notice that each HDC is only allowed to have its
pixel format to be set *once*). This is notably the case on Intel display
drivers.
Since we are emulating surfaceless GL contexts, we are using the dummy GL
context (and thus dummy HDC that is derived from the notification HWND used in
GdkWin32Display) for doing that, we would get into trouble if th actual HDC
from the GdkWin32Surface has a different pixel format set.
So, as a result, in order to fix this situation, we do the following:
* Create yet another dummy HWND in order to grab the HDC to query for the
capabilities the GL drivers support, and to call wglChoosePixelFormatARB() as
appropriate (or ChoosePixelFormat()) for the final pixel format that we use.
* Ditch the dummy GL context, HDC and HWND after obtaining the pixel format.
* Then set the final pixel format that we obtained onto the HDC that is derived
from the HWND used in GdkWin32Display for notifications, which will become our
new dummy HDC.
* Create a new dummy HGLRC for use with the new dummy HDC to emulate surfaceless
GL support.
2023-05-09 18:15:23 +08:00
Luca Bacci
347561fa68
Merge branch 'fix-5808' into 'main'
...
gdkglcontext-win32-wgl.c: Fix WGL context realization on 32-bit
Closes #5808
See merge request GNOME/gtk!5942
2023-05-09 07:59:17 +00:00
Chun-wei Fan
d02ae09124
gdkglcontext-win32-wgl.c: Fix WGL context realization on 32-bit
...
We are currently using g_clear_pointer() on the intermediate WGL contexts
(HGLRC)'s that we need to create in the way, which means that we need to ensure
that the correct calling convention for wglDeleteContext() is being applied.
To be absolutely safe about it, use the gdk_win32_private_wglDeleteContext()
calls, which will in turn call wglDeleteContext() directly from opengl32.dll
(using the OpenGL headers from the Windows SDK) instead of going via libepoxy,
which will assure us that the correct calling convention is applied.
Fixes issue #5808 .
2023-05-09 11:47:28 +08:00
Jason Francis
f3996a1a66
inspector: show GtkAccessible bounds in a11y pane
2023-05-08 21:33:04 -04:00
Jason Francis
1181ecbf0e
inspector: hide a11y object path when not using AT-SPI backend
2023-05-08 21:31:21 -04:00
Benjamin Otte
d948ac62e4
Merge branch 'wip/otte/for-main' into 'main'
...
Revert "TEST TEST TEST"
See merge request GNOME/gtk!5940
2023-05-08 18:19:03 +00:00
Benjamin Otte
507e346ff1
Revert "TEST TEST TEST"
...
This reverts commit 97aff588d5
.
That was a test commit for demonstrating things that shouldn't have made
it into main.
So throw it out again.
2023-05-08 19:51:08 +02:00
Emmanuele Bassi
98e6ed474f
Merge branch 'new-align-value' into 'main'
...
filterchooser: Maintain filter combo visibility
See merge request GNOME/gtk!5939
2023-05-08 15:07:26 +00:00
Matthias Clasen
ade316eaee
filterchooser: Maintain filter combo visibility
...
This code broke when it was ported to listmodels
since we always have a non-NULL lis model of filters.
It can just be empty.
2023-05-08 10:42:09 -04:00
Matthias Clasen
1e48843616
Merge branch 'new-align-value' into 'main'
...
Introduce GTK_ALIGN_BASELINE_FILL/CENTER
See merge request GNOME/gtk!5935
2023-05-08 13:28:15 +00:00
Matthias Clasen
58a5de6f5d
testsuite: Handle duplicate enum values
...
Our notify tests would fall over if there was
a duplicate enum value (within the first 10 values).
Make it handle that, by skipping the duplicate value.
2023-05-08 07:00:34 -04:00
Chun-wei Fan
a9ca72695f
reftest-snapshot.c: Fix running reftests on Visual Studio
...
On Visual Studio-like builds, shove a ".dll" suffix for the reftest
module so that we look for the correct DLL when running the tests.
2023-05-08 15:10:17 +08:00
Matthias Clasen
082ba6d7c8
Introduce GTK_ALIGN_BASELINE_FILL/CENTER
...
It turns out that the old behavior of GTK_ALIGN_BASELINE
was actually used in libadwaita, so bring it back, and
introduce a new GtkAlign value for the new behavior.
2023-05-07 21:26:09 -04:00
Matthias Clasen
61ff647f71
Merge branch 'node-editor-smarts' into 'main'
...
node-editor: Add some editor smarts
See merge request GNOME/gtk!5934
2023-05-07 13:59:42 +00:00
Matthias Clasen
823f56d263
Cleanup
2023-05-07 09:32:09 -04:00
Matthias Clasen
87332920d5
node-editor: Add some editor smarts
...
Allow control-clicks on some fields to bring up
a more specific UI. This functionality is also
available via Ctrl-E and the context menu.
At this point, it can edit colors, fonts and
files in some places, as well as a few enums.
2023-05-07 09:19:44 -04:00
Matthias Clasen
d2a358206c
Fix a typo in the node format definition
2023-05-07 09:19:44 -04:00
Matthias Clasen
51ea08aa9c
Merge branch 'wip/exalm/action-fixes' into 'main'
...
modelbutton: Fix a use after free when unsetting accel
See merge request GNOME/gtk!5933
2023-05-07 12:12:57 +00:00
Alice Mikhaylenko
380b63fede
modelbutton: Fix a use after free when unsetting accel
...
gtk_widget_remove_controller() already destroys the controller.
2023-05-07 15:21:16 +04:00
Matthias Clasen
df93875c0c
Merge branch 'matthiasc/for-main' into 'main'
...
rendernodeparser: Handle shader nodes better
See merge request GNOME/gtk!5930
2023-05-07 00:58:05 +00:00
Matthias Clasen
5a156e6b5f
rendernodeparser: Handle shader nodes better
...
Avoid criticals when editing shader nodes in
the node editor.
2023-05-06 14:33:45 -04:00
Matthias Clasen
0e488b3dfe
Merge branch 'headless-test-logging' into 'main'
...
ci: Improve headless test logging
See merge request GNOME/gtk!5929
2023-05-06 13:28:06 +00:00
Matthias Clasen
8495e0e412
Add a test for quick key events
2023-05-06 09:09:13 -04:00
Matthias Clasen
c9b0ca0de7
ci: Improve headless test logging
2023-05-06 09:02:25 -04:00
Benjamin Otte
2a950dec71
Merge branch 'wip/otte/update-texture' into 'main'
...
Add texture update regions
See merge request GNOME/gtk!5880
2023-05-06 00:59:25 +00:00
Matthias Clasen
d6c80d4f35
Merge branch 'tiled-states' into 'main'
...
Fix a corner-case in window states
Closes #5809
See merge request GNOME/gtk!5926
2023-05-05 23:58:08 +00:00
Matthias Clasen
e41cc99474
Merge branch 'wip/kabus/column-id-leak' into 'main'
...
gtk/columnviewcolumn: Fix id leak
See merge request GNOME/gtk!5927
2023-05-05 23:55:34 +00:00
Matthias Clasen
61fe5ac684
Handle the opposite case too
...
Just in case.
2023-05-05 19:40:42 -04:00
Khalid Abu Shawarib
1cf3f492b8
gtk/columnviewcolumn: Fix id leak
...
Add a free that was missing in commit 3e2b962a
2023-05-05 22:18:16 +00:00
Matthias Clasen
54fed96f8c
Fix a corner-case in window states
...
Remove detailed tiled states when not tiled.
Fixes : #5809
2023-05-05 16:47:43 -04:00
Matthias Clasen
e2d659d5c2
Merge branch 'matthiasc/for-main' into 'main'
...
ci: Bump timeouts for headless tests
See merge request GNOME/gtk!5925
2023-05-05 20:34:39 +00:00
Matthias Clasen
8ad1189b0b
ci: Bump timeouts for headless tests
2023-05-05 16:21:54 -04:00
Matthias Clasen
b5b7e1f2b4
Merge branch 'matthiasc/for-main' into 'main'
...
Add a masked variation to gsk tests
See merge request GNOME/gtk!5924
2023-05-05 20:12:12 +00:00
Matthias Clasen
e56a539363
Add a masked variation to gsk tests
...
This improves test coverage for mask nodes.
2023-05-05 15:05:08 -04:00
Matthias Clasen
5f91bb81ed
Merge branch 'matthiasc/for-main' into 'main'
...
node-editor: Be a bit better about saving
See merge request GNOME/gtk!5923
2023-05-05 18:50:16 +00:00
Matthias Clasen
1fba59f1d1
node-editor: Be a bit better about saving
...
When we have a file, suggest it for saving.
This has the side benefit of giving us a test case
for gtk_file_dialog_set_initial_file.
2023-05-05 14:18:40 -04:00
Matthias Clasen
68a2ca7e85
Merge branch 'matthiasc/for-main' into 'main'
...
gsk: Add a few assertions
See merge request GNOME/gtk!5922
2023-05-05 17:48:14 +00:00
Matthias Clasen
93ccf08c81
ci: Bump timeouts of headless tests
2023-05-05 12:05:10 -04:00
Matthias Clasen
e9f5a3e9e2
gsk: Introduce a constant
...
We need this number in a couple of places,
so pull it out as a constant.
2023-05-05 12:05:10 -04:00
Matthias Clasen
2b85c49fb1
gsk: Add a few assertions
...
Make sure we don't overflow our fixed-size arrays.
2023-05-05 12:05:10 -04:00
Matthias Clasen
d7c3235cd0
gsk: Add some debug helpers
2023-05-05 12:05:09 -04:00
Matthias Clasen
ea94bac79e
Merge branch 'better-masks' into 'main'
...
gsk: Avoid some offscreens
See merge request GNOME/gtk!5921
2023-05-05 15:56:16 +00:00
Matthias Clasen
63713c3b68
Merge branch 'fix-typo' into 'main'
...
gtkapplication-quartz: fix typo
Closes #5807
See merge request GNOME/gtk!5920
2023-05-05 15:39:46 +00:00
Matthias Clasen
81fd9741ff
gsk: Better handling of offscreens
...
Take the scale into account for sizing the
offscreens for masks, blends and cross-fades.
2023-05-05 11:37:23 -04:00
Luca Bacci
c7523cecf1
gtkapplication-quartz: fix typo
...
Fixes #5807
2023-05-05 16:26:26 +02:00
Matthias Clasen
ce6569d1a6
gsk: Avoid some offscreens
...
We don't have to be too conservative when checking
if a rect is contained in a rounded rect, we have
a precise api for this.
2023-05-04 22:30:12 -04:00
Matthias Clasen
852f46df19
Remove a no longer building test
2023-05-04 20:53:15 -04:00
Matthias Clasen
d82f603fcb
Merge branch 'smalltexture-plus-gles' into 'main'
...
Merge wayland_smalltexture and wayland_gles
See merge request GNOME/gtk!5917
2023-05-04 21:12:40 +00:00
Matthias Clasen
5e8e4130a5
Skip another failing gsk test with small textures
2023-05-04 15:36:57 -04:00
Matthias Clasen
f81aa14d93
Merge wayland_smalltexture and wayland_gles
...
We don't really need to have two full separate
test runs for these conditions, so combine them
into one test setup.
2023-05-04 15:13:09 -04:00
Matthias Clasen
81db6e9e61
Merge branch 'headless-tests' into 'main'
...
Get the headless monitor test to work in ci
See merge request GNOME/gtk!5915
2023-05-04 15:51:21 +00:00
Matthias Clasen
ac0311b621
ci: Mark headless monitor test as working
2023-05-04 11:39:35 -04:00
Matthias Clasen
f41e58d179
ci: Make run-docker run work
...
We want to have a writable volume and the same user
inside the container.
2023-05-04 11:38:55 -04:00
Matthias Clasen
d288931b45
More debug spew
...
Lets see what MUTTER_DEBUG=screen-cast says.
2023-05-04 11:38:55 -04:00
Matthias Clasen
03adeecfa3
Add generous waits
...
These tests work in the smae container locally.
Perhaps this is down to timing?
2023-05-04 11:38:55 -04:00
Matthias Clasen
5439f4596c
Merge branch 'headless-tests' into 'main'
...
Add headless tests using mutter
See merge request GNOME/gtk!5908
2023-05-04 04:20:11 +00:00
Matthias Clasen
f98d1a6474
Mark the headless monitor test as failing
...
This is failing because I can't figure out
how to make wireplumber and pipewire work
in ci enough to let me add a new monitor :(
As usual, the test works fine locally.
2023-05-03 23:53:14 -04:00
Matthias Clasen
57e6aae80a
Try to fix dnd tests
2023-05-03 23:27:09 -04:00
Matthias Clasen
f23eaafc85
Typo fix
2023-05-03 23:27:09 -04:00
Matthias Clasen
926b26e9fc
headless tests: Add debug spew
...
Trying to track down what is going on with our
missing monitors.
2023-05-03 23:27:09 -04:00
Matthias Clasen
88f27c423c
ci: Launch pipewire and wireplumber
...
The headless tests require pipewire and wireplumber
for screencast sessions to work. So launch them.
2023-05-03 23:27:09 -04:00
Matthias Clasen
30342896d0
Use python3
...
No /usr/bin/python in our CI image :(
2023-05-03 23:27:09 -04:00
Matthias Clasen
be8e203edc
Make the headless input tests work
...
These needed some updates and workarounds.
They are now part of the testsuite and can
be run like this:
meson test -Cbuild --suite headless
2023-05-03 23:27:09 -04:00
Matthias Clasen
623c93ccc8
Disable a11y for the headless tests
...
Otherwise, we go off activating things and end up
failing to launch systemd.
2023-05-03 23:27:09 -04:00
Matthias Clasen
34d8beaf4f
Add a dnd test to the headless tests
2023-05-03 23:27:09 -04:00
Matthias Clasen
983b6ce341
Use headless mutter for input tests
...
Add some input tests that are using headless
mutter, and python with our in-tree gir files.
So far, test that we can roundtrip key events,
and move the pointer around.
2023-05-03 23:27:09 -04:00
Matthias Clasen
771df47820
Use headless mutter for monitor tests
...
Add some monitor tests that are using headless
mutter, and python with our in-tree gir files.
So far, we test that we get expected signals
when monitors are added and removed.
2023-05-03 23:27:09 -04:00
Matthias Clasen
3c218687e3
Merge branch 'ci-update-meson' into 'main'
...
ci: Use newer meson
See merge request GNOME/gtk!5914
2023-05-04 02:57:23 +00:00
Matthias Clasen
37fb370a5d
ci: Remove the hack
2023-05-03 22:32:00 -04:00
Matthias Clasen
1cc9413383
ci: Use newer meson
2023-05-03 20:18:58 -04:00
Matthias Clasen
bfea39ab2f
ci: Add meson back to the fedora image
2023-05-03 20:18:58 -04:00
Matthias Clasen
84d6f023b5
ci: Add pipewire-gstreamer too
2023-05-03 20:18:58 -04:00
Matthias Clasen
7fe04a7122
ci: Add pipewire to the image
...
And its buddy, wireplumber.
But we don't need gnome-desktop-testing
anymore, now that installed tests are gone.
2023-05-03 20:18:58 -04:00
Matthias Clasen
19cea99007
Merge branch 'matthiasc/for-main' into 'main'
...
ci: Stop running failing tests
See merge request GNOME/gtk!5913
2023-05-03 19:54:24 +00:00
Matthias Clasen
1c4ad78d52
Merge branch 'stop-running-failing-tests' into 'main'
...
ci: Stop running failing tests
See merge request GNOME/gtk!5912
2023-05-03 19:33:35 +00:00
Matthias Clasen
955a7e643e
ci: Produce less terminal output
...
Pass --quiet to meson test.
Less is more, in this case.
2023-05-03 15:32:50 -04:00
Matthias Clasen
b85a137a68
Fix scan-build warning
2023-05-03 15:32:19 -04:00
Matthias Clasen
d17ca6b451
ci: Stop running the unstable test setups
...
This is just duplicating all our test runs,
for no discernible gain.
2023-05-03 15:11:53 -04:00
Matthias Clasen
da7040874e
ci: Stop running failing tests
...
This makes the test output much harder to read,
and is just a waste of time.
2023-05-03 14:42:10 -04:00
Danial Behzadi
6f9c4c894d
Update Persian translation
...
(cherry picked from commit 954011ef80
)
2023-05-03 09:01:04 +00:00
Benjamin Otte
cc7a35cd30
Merge branch 'wip/otte/for-main' into 'main'
...
build: Use generated SPIR-V files
Closes #5798
See merge request GNOME/gtk!5910
2023-05-02 18:09:13 +00:00
Benjamin Otte
f841621348
css: Don't transition to currentColor
...
Transition to the color that is in use instead.
Fixes crashes because currentColor is not an RGBA color and
therefor could not be queried later.
Fixes #5798
2023-05-02 19:50:31 +02:00
Benjamin Otte
f99ecd3739
vulkan: Compute offscreen texture coords properly
...
Most of the time we want to compute them based on the child node we
render to the offscreen, but not always.
For blend and cross-fade nodes, they need to be computed based on the
node's bounds.
Fixes widget-factory page fade animation weirdly resizing the fading
pages.
2023-05-02 19:44:06 +02:00
Matthias Clasen
5eb7e550d1
Merge branch 'matthiasc/for-main' into 'main'
...
Expand gtk_init docs
Closes #5781
See merge request GNOME/gtk!5909
2023-05-02 17:42:29 +00:00
Matthias Clasen
8d33f2a511
Add a comment to pango.wrap
...
So we remember the next time we try to
switch to stable dependencies.
2023-05-02 13:18:49 -04:00
Matthias Clasen
27b0321dec
Expand gtk_init docs
...
Make it clear that some aspects of GApplication
functionality happen before startup.
Fixes : #5781
2023-05-02 13:18:49 -04:00
Matthias Clasen
538605eccb
Merge branch 'matthiasc/for-main' into 'main'
...
Don't build fribidi docs
See merge request GNOME/gtk!5906
2023-05-02 13:29:20 +00:00
Matthias Clasen
81f5967587
Make run-test.sh easier to use locally
...
Set a default timeout multiplier so we don't
have to rememver obscure environment variables.
2023-05-02 06:38:30 -04:00
Matthias Clasen
771437acf9
Go back to fribidi master
...
Fribidi 1.0.12 does not work as a subproject :(
2023-05-02 06:22:44 -04:00
Matthias Clasen
a3da58133e
Don't build fribidi docs
...
There's no need for that. This matches what pango does.
2023-05-02 06:22:24 -04:00
Benjamin Otte
9b558b50b8
vulkan: Rebuild SPIR-V files
...
It's been a while since somebody last compiled them, glslc should be
somewhat newer by now.
2023-05-02 08:47:10 +02:00
Benjamin Otte
7ce2eeac47
build: Use generated SPIR-V files
...
We weren't looking in the build dir for generated files.
Actually make sure that we look in the build dir *first*, otherwise
glib-compile-resources will still use the wrong files.
2023-05-02 08:41:43 +02:00
Matthias Clasen
182dccb8f0
Use pango main as subproject
...
This is necessary to get the latest pango docs
built in ci.
2023-05-01 23:55:21 -04:00
Matthias Clasen
17d2ba94d6
stop using deprecated pango api
2023-05-01 23:49:42 -04:00
Matthias Clasen
5bac4f13a0
ci: Add mutter to the fedora image
...
This is in preparation for trying to use mutter --headless
in ci.
2023-05-01 21:11:01 -04:00
Benjamin Otte
97aff588d5
TEST TEST TEST
...
Add some random updates to the GL Area, so that funky testing can be
done with the GLArea and Gears gtk-demo.
2023-05-02 00:30:58 +02:00
Benjamin Otte
e4040adbe7
rendernode: Implement texture diffing for scale nodes
2023-05-02 00:30:58 +02:00
Benjamin Otte
6506a3bc9c
texturebuilder: Add ::udpate-region and ::update-texture
2023-05-02 00:30:58 +02:00
Matthias Clasen
64f9d82506
Merge branch 'gsk-flip-tests' into 'main'
...
more gsk tests
See merge request GNOME/gtk!5811
2023-05-01 21:06:32 +00:00
Matthias Clasen
b83f3d871f
Merge branch 'matthiasc/for-main' into 'main'
...
Cosmetics: Unset baseline too
See merge request GNOME/gtk!5904
2023-05-01 20:41:13 +00:00
Matthias Clasen
a235b59089
Skip some tests with small textures
...
When textures are too large, we will scale them down
to fit the max texture size, which will cause comparisons
to fail.
2023-05-01 16:29:45 -04:00
Benjamin Otte
1883035d34
texture: Add gdk_texture_diff()
...
... and use it in rendernodes.
Setting up textures for diffing is done via gdk_texture_set_diff() which
should only be used during texture construction.
Note that the pointers to next/previous are allowed to dangle if one of
the textures is finalized, but that's fine because we always check both
textures' links to each other before we consider the pointer valid.
2023-05-01 22:24:14 +02:00
Matthias Clasen
0ca6471df4
Cosmetics: Unset baseline too
...
We set width and height to 0 when unrealizing
a widget. No reason to let the baseline value
linger.
2023-05-01 16:15:11 -04:00
Matthias Clasen
98dde97f20
Merge branch 'better-switch-docs' into 'main'
...
switch: Expand the docs
See merge request GNOME/gtk!5903
2023-05-01 20:03:44 +00:00
Matthias Clasen
9bd9847b3f
switch: Expand the docs
...
Add more text and explanation around active vs state,
since people seem easily confused by it.
2023-05-01 15:15:53 -04:00
Matthias Clasen
b79d4a3a22
gsk: Fix rendering big textures with offsets
...
When slicing the texture, the GL renderer was
forgetting to apply the viewport origin. This
shows up when rendering things with negative
scales, leading to negative origins.
2023-05-01 14:46:30 -04:00
Matthias Clasen
33ab588d4e
Improve test coverage
...
Check that our two rounded rect intersection functions agree.
2023-05-01 13:58:42 -04:00
Matthias Clasen
7200a93a88
gsk: Give up on one test
...
The rounded-clip-in-clip-3d test fails in GL when
flipped. Given that it was already excluded from cairo,
and also fails cairo when flipped, give up on it for now.
2023-05-01 13:45:20 -04:00
Matthias Clasen
319762b908
gsk: Extract scales properly from 2D transforms
...
We have the code to do it properly.
2023-05-01 13:45:20 -04:00
Matthias Clasen
e453a989df
Improve rounded rect intersection
...
Move the rounded rect/rect intersection code to
gskroundedrect.c, make it more precise, and add
tests for it.
Update the callers in the GL renderer.
2023-05-01 13:45:20 -04:00
Matthias Clasen
f56328a6cc
gsk: Fix mask transform handling
...
We must reset the modelview transform when
offscreen, or else we end up applying
it twice.
2023-05-01 13:45:20 -04:00
Matthias Clasen
f29b24517e
Add a test for rotated blend nodes
2023-05-01 13:45:20 -04:00
Matthias Clasen
552df197c4
gsk: Fix blend transform handling
...
We must reset the modelview transform when
rendering offscreen, or else we end up applying
it twice.
2023-05-01 13:45:20 -04:00
Matthias Clasen
f6e47b7eb0
Add a test for rotated cross-fade nodes
...
This one checks that we don't apply the modelview
transform twice with cross-fades.
2023-05-01 13:45:13 -04:00
Matthias Clasen
4214067d52
gsk: Fix cross-fade transform handling
...
We must reset the modelview transform when
rendering offscreen, or else we end up applying
it twice.
2023-05-01 13:44:55 -04:00
Matthias Clasen
d9a2b74b4a
gsk: More fixes
...
Work towards handling negative scales and
denormalized rects everywhere.
2023-05-01 13:43:33 -04:00
Matthias Clasen
21df62f428
Add another test
2023-05-01 13:43:33 -04:00
Matthias Clasen
4e501d2d44
gsk: Transform rounded rects better
2023-05-01 13:43:33 -04:00
Matthias Clasen
5afd5cfec7
Add another gsk test
2023-05-01 13:43:33 -04:00
Matthias Clasen
ad65db901a
gsk: Normalize rects in GLSL
...
Our coverage computation only works for well-behaved
rects and rounded rects. But our modelview transform
might flip x or y around, causing things to fail.
Add functions to normalize rects and rounded rects,
and use it whenever we transform a rounded rect in GLSL.
2023-05-01 13:43:33 -04:00
Matthias Clasen
406b1e2e03
testsuite: Fix gsk test
...
The repeated tests were not careful enough to produce
the correct reference image to match what the repeat
node does.
With these changes, all cairo tests pass.
2023-05-01 13:43:33 -04:00
Matthias Clasen
f1729affa8
testsuite: Add more gsk tests
...
Add separate suites for running the gsk compare-render
tests with the --flip, --rotate or --repeat options.
A bunch of these fail currently, and need diagnosis.
2023-05-01 13:35:35 -04:00
Matthias Clasen
3b2ba8ed99
Add more gsk tests
...
Add options to the gsk compare-render test for
modifying the node (and do a matching change to
the reference image).
flip: negative scale flipping things horizontally
rotate: 90 degree rotation
repeat: 2x2 grid
2023-05-01 13:35:35 -04:00
Matthias Clasen
386c3ac34f
Add another transform test
...
Test that transforming bounds with negative scales
works as expected.
2023-05-01 13:35:22 -04:00
Matthias Clasen
d92c6406d1
Merge branch 'displaymanager-warning-fix' into 'main'
...
Avoid a bad warning
See merge request GNOME/gtk!5901
2023-05-01 16:56:40 +00:00
Matthias Clasen
d666f4ab7f
Avoid a bad warning
...
This isn't what we intended, and it breaks CI for
various projects.
2023-05-01 10:40:26 -04:00
Georges Basile Stavracas Neto
5df360f436
Merge branch 'alatiera/vulkan-headers-fix' into 'main'
...
vulkan: Correct error enum version guards
See merge request GNOME/gtk!5900
2023-05-01 14:00:43 +00:00
Jordan Petridis
0197149ba3
vulkan: Correct error enum version guards
...
Vulkan 218 introduced these errors by they were marked as
the beta till version 238.
00671c64ba (diff-e222ae95c2b0d5082b94d6086fb1c24da18ee31384c1a39840df3b9152023ee6)
Followup to f9b2d3104a
2023-05-01 09:41:35 +03:00
Matthias Clasen
b310ab7304
Merge branch 'matthiasc/for-main' into 'main'
...
docs: Migration guide updates
See merge request GNOME/gtk!5899
2023-04-30 22:39:57 +00:00
Matthias Clasen
062e3da57d
Merge branch 'emojichooser-variation-fix' into 'main'
...
emojichooser: Avoid extraneous variation selectors
See merge request GNOME/gtk!5898
2023-04-30 22:29:11 +00:00
Matthias Clasen
cdbd931dba
docs: Migration guide updates
...
Mention various widget size apis going away.
2023-04-30 18:21:46 -04:00
Matthias Clasen
2f96a08b3f
gsk: Plug a few memory leaks
2023-04-30 18:21:23 -04:00
Matthias Clasen
c1fc6c35cf
emojichooser: Avoid extraneous variation selectors
...
Only add a variation selector if there isn't one already.
2023-04-30 11:56:43 -04:00
Daniel Boles
060992aeba
migrating-3to4: Fix unescaped ptr * used as italic
2023-04-30 16:55:31 +01:00
Daniel Boles
2c15d563e2
gtk-demo/listbox: Fix 0 space between nick & date,
...
by restoring the right-alignment that gtk-3-24 has here, but we had lost
– I guess because we dropped the default child expand and pack-end props
2023-04-30 16:39:16 +01:00
Daniel Boles
2dd7ab2a50
Inscription|InfoBar: Fix small cosmetic issue@docs
2023-04-30 16:05:11 +01:00
Daniel Boles
0736fef585
Merge branch 'dboles/expander-css-nodes-doc' into 'main'
...
Expander: Clarify/format “CSS nodes” documentation
See merge request GNOME/gtk!5896
2023-04-30 11:37:55 +00:00
Daniel Boles
0442fc2b55
Expander: Clarify/format CSS nodes documentation
...
Use backticks to highlight the node names, mention the box, and clarify
that the arrow referred to in the last sentence is the `expander` node.
2023-04-30 11:56:07 +01:00
Matthias Clasen
27c621695e
Merge branch 'deprecated-get-allocated-width' into 'main'
...
Deprecated get allocated width
See merge request GNOME/gtk!5894
2023-04-29 18:55:45 +00:00
Matthias Clasen
1a237ef6a8
Merge branch 'box-baseline-child' into 'main'
...
boxlayout: Add a baseline child property
See merge request GNOME/gtk!5891
2023-04-29 18:30:59 +00:00
Matthias Clasen
e7ba8e7e9a
Deprecate gtk_widget_get_allocated_width
2023-04-29 14:30:21 -04:00
Matthias Clasen
14279785e6
tests: Stop using gtk_widget_get_allocated_width
2023-04-29 14:30:21 -04:00
Matthias Clasen
5b6f8d7002
gtk4-demo: Stop using gtk_widget_get_allocated_size
2023-04-29 14:30:21 -04:00
Matthias Clasen
71a752490a
popover: Stop using gtk_widget_get_allocated_width
2023-04-29 14:30:21 -04:00
Matthias Clasen
3f4f37661c
placesview: Stop using gtk_widget_get_allocated_width
2023-04-29 14:30:21 -04:00
Matthias Clasen
5bc5a6f2cd
placessidebar: Stop using gtk_widget_get_allocated_width
2023-04-29 14:30:21 -04:00
Matthias Clasen
1a90724de9
columnview: Stop using gtk_widget_get_allocated_width
2023-04-29 14:30:21 -04:00
Matthias Clasen
f8f91095a3
Merge branch 'matthiasc/for-main' into 'main'
...
widget: Cosmetics
See merge request GNOME/gtk!5892
2023-04-29 18:29:14 +00:00
Benjamin Otte
6cc1548c5f
Merge branch 'wip/carlosg/x11-artifacts' into 'main'
...
gdk/x11: Invalidate whole surface after size change
See merge request GNOME/gtk!5857
2023-04-29 18:11:21 +00:00
Matthias Clasen
30b12ff890
docs: Mention baselines
...
Add a paragraph about baselines to the coordinates overview.
2023-04-29 13:48:03 -04:00
Matthias Clasen
b9931e9573
widget: Cosmetics
...
Rename allocated_size_baseline to allocated_baseline,
to match better with the other allocated_ fields.
2023-04-29 13:47:51 -04:00
Matthias Clasen
cab8981c57
spinbutton: Use GtkBoxLayout:baseline-child
...
This makes it so that vertical spin buttons are
properly aligned to the baseline.
2023-04-29 13:28:55 -04:00
Matthias Clasen
b6786b8a49
Revert "spinbutton: Use a grid layout"
...
This reverts commit d648a7721e
.
2023-04-29 13:28:55 -04:00
Matthias Clasen
2d9ae241d5
boxlayout: Add a baseline child property
...
In horizontal layout, we line up the baselines of all children to find
how much space we need above and below the box baseline.
In vertical layout, we need to pick one child to inherit the baseline
from, which is what the new GtkBoxLayout:baseline-child property is
about. It is the equivalent of GtkGridLayout:baseline-row.
2023-04-29 13:28:55 -04:00
Daniel Boles
a24a924a6b
EventController: Fix type "even propagation"→event
2023-04-29 18:12:30 +01:00
Matthias Clasen
825eb93509
Remove more debug spew
2023-04-29 11:46:16 -04:00
Matthias Clasen
a8a0850b64
Merge branch 'matthiasc/for-main' into 'main'
...
entry: Ignore the baseline when centering
See merge request GNOME/gtk!5889
2023-04-29 14:16:42 +00:00
Matthias Clasen
03f388d099
widget: Don't set baselines when unused
...
When we are not doing baseline alignment, don't pass
a baseline to the allocated widget. This helps because
a number of widgets (GtkLabel, GtkEntry, etc) always
position their text on the given baseline.
2023-04-29 09:52:34 -04:00
Matthias Clasen
92205744d2
entry: Ignore the baseline when centering
...
GtkEntry was always placing its text on the baseline,
even when the valign said something else.
2023-04-29 09:52:34 -04:00
Matthias Clasen
f6f3a78dd9
Merge branch 'matthiasc/for-main' into 'main'
...
theme: Reinstate switch labels in hc
See merge request GNOME/gtk!5888
2023-04-29 12:27:23 +00:00
Matthias Clasen
76698e5de8
testbaseline2: Don't set height-requests
...
Widget with height requests have their baselines
ignored. Oops.
2023-04-29 08:01:11 -04:00
Matthias Clasen
21260e8ed4
theme: Reinstate switch labels in hc
...
Since we show them in GNOME shell, show them here too.
The comment that says "only show these in the a11y
theme" was still there, but we were always hiding them.
2023-04-29 08:01:03 -04:00
Carlos Garnacho
24302315fb
gdk/x11: Invalidate whole surface after size change
...
The Expose events following a ConfigureNotify may arrive at
a time that we did not resize the surface yet, making these
expose events a no-op. Even though gsk/gtk take care of the
window content itself, this might lead to unrendered portions
of the window shadow.
This may be seen with GSK_RENDERER=cairo and GDK_BACKEND=x11,
attempting to tile a window (e.g. gtk4-demo) left or right.
The window will show black rectangles or other artifacts in
the window shadow areas that correspond to the newly painted
portions (as the window needs to expand vertically).
In order to fix this with a similar behavior to Wayland,
consider ourselves the whole surface invalidated after resize,
in order to ensure everything is painted from scratch.
2023-04-29 11:51:32 +02:00
Fabio Tomat
fc9642ce2a
Update Friulian translation
2023-04-29 08:57:53 +00:00
Benjamin Otte
c542351a73
Merge branch 'wip/otte/for-main' into 'main'
...
wayland: Use wl_surface_damage_buffer() in Cairo
See merge request GNOME/gtk!5886
2023-04-29 03:43:45 +00:00
Benjamin Otte
3198330188
rendernode: Add diffing for affine transforms
...
This will be needed most importantly for inverted textures,
like in GLArea.
2023-04-29 05:10:51 +02:00
Benjamin Otte
11aaa29a69
wayland: Use wl_surface_damage_buffer() in Cairo
...
... when it is available.
Also introduce the new function gdk_rectangle_transform_affine(), which
looks like overkill for this purpose, but I'm about to use it elsewhere.
2023-04-29 05:07:03 +02:00
Matthias Clasen
d1a25178fd
Merge branch 'matthiasc/for-main' into 'main'
...
shortcutswindow: Avoid criticals
See merge request GNOME/gtk!5885
2023-04-29 01:15:58 +00:00
Matthias Clasen
092745161c
shortcutswindow: Avoid criticals
...
No point in resetting accessible relations
when we are in finalize.
2023-04-28 20:44:18 -04:00
Matthias Clasen
0da4a92298
Merge branch 'clarify-swapped-default-object-signal' into 'main'
...
builder: Clarify default "swapped" value when "object" is set for signals
See merge request GNOME/gtk!4514
2023-04-28 23:00:31 +00:00
Matthias Clasen
8b816d3b03
Merge branch 'gtkshortcutswindow_a11y' into 'main'
...
GtkShortcutsWindow: Allow a screen reader user to browse the available shortcuts
See merge request GNOME/gtk!5042
2023-04-28 22:57:10 +00:00
Matthias Clasen
63b50f48a9
Merge branch 'harmonize-would_drop' into 'main'
...
Harmonize would_drop() replacement for g_log_writer_default_would_drop()
See merge request GNOME/gtk!4935
2023-04-28 22:55:42 +00:00
Matthias Clasen
8b91762c42
Merge branch 'deprecate-get-allocation' into 'main'
...
Deprecate get allocation
See merge request GNOME/gtk!5882
2023-04-28 22:49:42 +00:00
Matthias Clasen
01f39d8522
README: Updates
...
Drop the section that talked about main and how to update
local checkouts - its been 2 years, people should have gotten
around to it by now. Add some general git hints instead.
2023-04-28 17:31:12 -04:00
Benjamin Otte
e94416054c
Merge branch 'wip/otte/for-main' into 'main'
...
Fix hangs on Wayland
Closes #5761
See merge request GNOME/gtk!5884
2023-04-28 21:22:12 +00:00
Benjamin Otte
b4c859c011
wayland: Set EGL swap interval to 0.
...
There's no need for EGL to do any timing, we do it in GTK already.
This fixes hangs in Mesa when we hide a surface after a SwapBuffers()
but before the frame callback arrives.
If we then reshow the surface and immediately render to it, Mesa would
still have a frame callback from before the hiding and forever poll()
waiting for the compositor to send the callback.
Fixes #5761
2023-04-28 22:40:39 +02:00
Benjamin Otte
45216e1c88
wayland: Disconnect the frame callback when hiding
...
Do not leave spurious frame callbacks around wen hiding surfaces.
Instead, store the callback and remove it.
2023-04-28 22:21:42 +02:00
Daniel Boles
7bea2685e1
migrating-3to4: Don't mention removed Box method &
...
donʼt mention its renamed successor either, as that has its own section
later. We could have another sentence paragraph like ‘In the case of
GtkBox, the pack methods have been renamed to X and lost the trailing
arguments Y’, but that wonʼt help people prepare still on GTK3, which is
the point in the affected section… so just remove the misleading relic.
2023-04-28 21:14:37 +01:00
Matthias Clasen
b7d1774c56
Merge branch 'matthiasc/for-main' into 'main'
...
Cosmetics
See merge request GNOME/gtk!5883
2023-04-28 20:09:17 +00:00
Matthias Clasen
3afd91ea06
Updates
2023-04-28 16:02:18 -04:00
Matthias Clasen
d7dd6ca552
Cosmetics
2023-04-28 15:36:37 -04:00
Matthias Clasen
9c40e8b873
Deprecate gtk_widget_get_allocated_baseline
2023-04-28 15:26:16 -04:00
Matthias Clasen
b201d66981
Stop using gtk_widget_get_allocated_baseline
...
Use gtk_widget_get_baseline instead.
2023-04-28 15:25:58 -04:00
Matthias Clasen
3ea289751d
Add gtk_widget_get_baseline
...
This is just a renaming of gtk_widget_get_allocated_baseline
that fits better with gtk_widget_get_width/height.
2023-04-28 15:18:13 -04:00
Matthias Clasen
8205c7032a
Deprecate gtk_widget_get_allocation
2023-04-28 15:05:39 -04:00
Matthias Clasen
ba379c928b
flowbox: Use deprecation guards around get_allocation
2023-04-28 15:05:39 -04:00
Matthias Clasen
5306ef12f4
inspector: Show bounds instead of allocation
2023-04-28 15:05:39 -04:00
Matthias Clasen
be62147dee
scrolledwindow: Stop using gtk_widget_get_allocation
2023-04-28 15:05:39 -04:00
Matthias Clasen
627ce3d447
textutil: Stop using gtk_widget_get_allocation
2023-04-28 15:05:39 -04:00
Matthias Clasen
79119e64f9
tetview: Stop using gtk_widget_get_allocation
2023-04-28 15:05:39 -04:00
Matthias Clasen
37b2b3cb83
text: Stop using gtk_widget_get_allocation
2023-04-28 15:05:39 -04:00
Boyuan Yang
731c1be9e0
Update Chinese (China) translation
2023-04-28 18:51:56 +00:00
Benjamin Otte
76777cdd18
Merge branch 'wip/otte/texturebuilder' into 'main'
...
Add GdkGLTextureBuilder
See merge request GNOME/gtk!5862
2023-04-28 15:58:10 +00:00
Matthias Clasen
bdec7782b4
Merge branch 'baseline-fixes' into 'main'
...
boxlayout: Fix baselines a bit
See merge request GNOME/gtk!5879
2023-04-28 14:40:57 +00:00
Matthias Clasen
55f5edffd1
More docs for BASELINE
...
Add some more details to the docs for GTK_ALIGN_BASELINE.
2023-04-28 09:21:15 -04:00
Matthias Clasen
bb961d062a
widget: Handle baseline better
...
When adjusting allocations, treat BASELINE more like CENTER
than like FILL. The results are better, in particular for
controls like entries or switches, which we never want to
scale up vertically, but still want to align to the baseline.
2023-04-28 09:13:49 -04:00
Matthias Clasen
38ffd099eb
image: Simplify baseline handling
...
We guarantee that the out arguments of the measure
vfunc are non-NULL, no need to check.
2023-04-28 09:12:22 -04:00
Matthias Clasen
12af75df9b
switch: Fix up baseline handling
...
We need to report a baseline for baseline alignment
to work...
2023-04-28 08:52:05 -04:00
Matthias Clasen
d648a7721e
spinbutton: Use a grid layout
...
A grid layout lets us get the baseline right in
vertical orientation, by setting a baseline row.
It would be nice if the box layout supported this
as well, but currently it doesn't, and adding that
feature isn't trivial.
2023-04-28 08:50:12 -04:00
Matthias Clasen
e187587643
boxlayout: Fix baselines a bit
...
When we are not doing height-for-width, we still
need to line up baselines.
2023-04-28 08:50:12 -04:00
Matthias Clasen
3766f1da8b
Add another baseline test client
2023-04-28 08:50:12 -04:00
Matthias Clasen
92a9f8cd7e
gldriver: Add a sync when creating textures
2023-04-28 06:23:45 +02:00
Matthias Clasen
b9a7e5fa85
gstreamer: Defer the sync
...
Don't sync right when we receive the buffer,
pass it along with the texture to be executed
later in the renderer.
2023-04-28 06:23:45 +02:00
Matthias Clasen
bec0afa61b
glarea: Synchronize
...
Create a fence object and pass it along when
creating the GL texture, so that the GL renderer
can wait for the texture to be ready.
2023-04-28 06:23:40 +02:00
Matthias Clasen
bedc3dba7e
filechooser: Plug a memory leak
2023-04-27 13:42:03 +02:00
Matthias Clasen
7c4acac135
Add some more valgrind suppressions
2023-04-27 13:42:03 +02:00
Matthias Clasen
0bb6988c0e
columnview: Plug a memory leak
...
g_list_model_get_item strikes again.
2023-04-27 13:42:03 +02:00
Matthias Clasen
df3622b295
filechooser: Plug a memory leak
...
We own references to the columns. Drop them.
2023-04-27 13:42:03 +02:00
Matthias Clasen
df9f3fc694
filechoosernative: Plug a memory leak
...
Unref all the GVariants.
2023-04-27 13:42:03 +02:00
Matthias Clasen
39b3b2444b
filedialog: Plug a memory leak
...
We own a reference to the native dialog,
and we need to drop it when we're done.
2023-04-27 13:42:03 +02:00
Matthias Clasen
c237643b24
node-editor: Plug a memory leak
2023-04-27 13:42:03 +02:00
Matthias Clasen
cc682a96d9
notebook: Drop an unused variable
2023-04-27 13:42:03 +02:00
Matthias Clasen
051b463c9a
Fix various bitfield warnings
...
clang rightly complains about using gboolean
as type for bitfields, since it is signed.
Avoid that.
2023-04-27 13:42:03 +02:00
Matthias Clasen
8292b846d5
gsk: Synchronize when using textures
...
Pass the GLsync object from texture into our
command queue, and when executing the queue,
wait on the sync object the first time we
use its associated texture.
2023-04-27 06:57:02 +02:00
Matthias Clasen
6efaa79e3c
gltexture: Synchronize when downloading
...
If the GL texture has a sync object, wait
on it before downloading the data.
2023-04-27 06:57:02 +02:00
Matthias Clasen
92eb845482
gltexture: Optionally take a sync object
...
Add a new function to TextureBuilder that takes a GLsync that
requires internal code to wait on before using the texture.
Somewhat sneakily, we don't take the sync if syncs are not supported by
the current GL context.
As public API has no code to query the sync for the destroy notify, this
is fine and it means we don't have to do the check every time we want to
call gdk_texture_get_sync() internally.
2023-04-27 06:55:37 +02:00
Matthias Clasen
5071e6154c
glcontext: Add a way to check for GLsync
2023-04-27 06:54:49 +02:00
Benjamin Otte
18a4b2475e
gltexture: Deprecate gdk_gl_texture_new()
...
Use GdkGLTextureBuilder instead.
2023-04-27 06:40:47 +02:00
Benjamin Otte
76e5fd0ece
glrenderer: Port to GdkGLTextureBuilder
2023-04-27 06:40:47 +02:00
Benjamin Otte
fa44d258d0
media-gstreamer: Port to GdkGLTextureBuilder
...
This is a rudimentary port that does not take advantage of all the cool
new formats that we could support now.
2023-04-27 06:40:47 +02:00
Benjamin Otte
778979cf0e
testsuite: Use GLTextureBuilder
2023-04-27 06:40:47 +02:00
Benjamin Otte
053a4d2e9d
glarea: Port to GdkGLTextureBuilder
2023-04-27 06:40:47 +02:00
Benjamin Otte
aae7b2c8a8
texturebuilder: Pass the destroy notify to the build() function
...
This is more compatible with bindings that want to create per-object
callbacks and not have their callbacks reused over different build()
calls.
2023-04-27 06:40:47 +02:00
Benjamin Otte
e37fbaf13a
texturebuilder: Add ::format and ::has-mipmap
...
We were trying to deduce that previously. Now we have explicit API
2023-04-27 06:40:47 +02:00
Benjamin Otte
e4f4cfaf14
gdk: Add GdkGLTextureBuilder
...
Building GL textures is complicated, so create an object to make them.
So far, this object just contains the functionality of
gdk_gl_texture_new(), but that will change in the future.
2023-04-27 06:40:47 +02:00
Matthias Clasen
9ae0a3865c
Merge branch 'matthiasc/for-main' into 'main'
...
Fix the build with clang
See merge request GNOME/gtk!5876
2023-04-27 04:37:12 +00:00
Benjamin Otte
3b5a2d60c7
Merge branch 'wip/otte/gl-version' into 'main'
...
Make sure highest possible version GLContext is created
See merge request GNOME/gtk!5870
2023-04-27 00:39:19 +00:00
Benjamin Otte
9254ab8503
wgl: Improve error messages when GL init fails
...
In particular, we want to get the GL version, when the Windows box/VM
has an unsuitable GL implementation.
This is somewhat helpful in analyzing failures to bring up GL on
machines where users claim GL does work.
2023-04-27 02:19:25 +02:00
Benjamin Otte
d6afcee1e4
wgl: Create context during WGL initialization
...
This way, we can realize it and either print success information about
it or return NULL if that fails.
This makes it more likely that we fail early, which means we can then
initialize EGL.
2023-04-27 02:16:46 +02:00
Benjamin Otte
c71ca481c1
win32: Get rid of display->gl_version
...
We can just query the display's GL context.
And it's not used otherwise anymore.
2023-04-27 02:13:33 +02:00
Benjamin Otte
8ef38c46b5
win32: Refactor context creation
...
This refactor achieves the following:
* check GL version against proper matching context version
In particular, for legacy contexts, we now actually check
* make sure the actual version is set, even for legacy contexts
* make sure set_is_legacy() is set properly
2023-04-27 02:13:33 +02:00
Benjamin Otte
4333d754b8
gdk: Add workaround for Visual Studio
...
apparently casting something to itself makes it not constant.
2023-04-27 02:13:33 +02:00
Benjamin Otte
9f82d537b0
mac: Properly set GLContext.is_legacy()
2023-04-27 02:13:32 +02:00
Benjamin Otte
7c7a3d67ca
glcontext: assert all contexts set the version on realize()
...
Now that all contexts do that, insist that they keep doing it.
And because they keep doing it, we can support querying the GL version
from gdk_gl_context_get_version() without requiring the context to be
made current.
2023-04-27 02:13:32 +02:00
Benjamin Otte
d33b82249b
mac: Try all different OpenGL profiles
...
.. and pick the best one that is supported.
Also make sure that the resulting context has at least the desired
version, otherwise bail.
2023-04-27 02:13:32 +02:00
Benjamin Otte
5f833f1d31
glcontext: Compute matching version the simple way
...
Do it all in one function instead of requiring two different ones.
2023-04-27 02:13:32 +02:00
Benjamin Otte
b8958419e6
win32: Make sure highest possible GL version is created
...
Mirror EGL here.
2023-04-27 02:13:32 +02:00
Benjamin Otte
919c90182f
win32: Pass the version properly through the creation stack
...
We were using major/minor instead of GdkGLVersion.
And we were resetting back to 0 and ignoring the required min version
which we should not do.
2023-04-27 02:13:32 +02:00
Benjamin Otte
ab2a548479
glx: Make sure highest possible GL version is created
...
Mirror EGL here.
2023-04-27 02:13:32 +02:00
Benjamin Otte
34662fc4b0
egl: Make sure highest possible GL version is created
...
The EGL spec states:
The context returned must be the specified version, or a later
version which is backwards compatible with that version.
Even if a later version is returned, the specified version
must correspond to a defined version of the client API.
GTK has so far been relying on EGL implementations returning a
later version, because that is what Mesa does.
But ANGLE does not do that and only provides the minimum version, which
means Windows EGL has been forced to use a lower EGL version for no
reason.
So fix this and try versions in order from highest to lowest.
2023-04-27 02:13:32 +02:00
Benjamin Otte
5b376cedcf
gdk: Move GdkGLAPI enum into gdkenums.h
2023-04-27 02:13:32 +02:00
Benjamin Otte
3aefed39b1
glcontext: Use GdkGLVersion elsewhere
...
... and add a convenience API to generate GL versions from strings to
make the gdk_gl_context_check() API nicer.
2023-04-27 02:13:32 +02:00
Benjamin Otte
f86429177a
gdk: Introduce GdkGLVersion
...
... and use it.
Makes the code simpler.
2023-04-27 02:13:32 +02:00
Benjamin Otte
dacfed3e11
win32: Remove an outdated check
...
We require GL 3.0, so checking for less than 2.0 makes no sense anymore.
2023-04-27 02:13:32 +02:00
Matthias Clasen
8fb2ee7d67
Fix a crash
...
Fix an oversight from c87b193d2a
.
2023-04-27 00:09:18 +02:00
Benjamin Otte
29e7186829
Merge branch 'wip/otte/treelistmodel-madness' into 'main'
...
treelistmodel: Be safer during collapsing
See merge request GNOME/gtk!5875
2023-04-26 22:06:40 +00:00
Matthias Clasen
951e3b3d6b
Fix the build with clang
...
This broke our macos ci.
2023-04-26 23:54:43 +02:00
Benjamin Otte
3c76f3fb58
treelistmodel: Delay notifies from TreeListRow
...
Don't notify during destruction, notify afterwards.
This way we don't call into user code from a half-destructed node.
Note that this changes the order in which those notifies happen when
collapsing a large tree: From parent node before child nodes to child
nodes before parent node.
No actual use case for this, just thought it would be safer.
2023-04-26 23:40:56 +02:00
Benjamin Otte
8766a6fab2
treelistmodel: Be safer during collapsing
...
While we are collapsing a subtree, some signal handlers may not be
disconnected while we are doing this. By adding this check and not
giving those nodes no longer access to the model, we can stop it from
modifying it while we are trying to collapse stuff.
Fixes some crashes in gnome-builder.
2023-04-26 23:30:37 +02:00
Benjamin Otte
f52975c220
Merge branch 'wip/otte/surface-surgery' into 'main'
...
refactor internal surface API
See merge request GNOME/gtk!5846
2023-04-26 21:03:24 +00:00
Daniel Boles
abd4a57031
3to4: Fix we said we replace doubles with doubles,
...
when what we are replacing are ints!
2023-04-26 21:30:10 +01:00
Benjamin Otte
9d0448756f
display: Remove ::create_surface() vfunc
...
Instead, have a toplevel_type and popup_type in GdkDisplay and
call g_object_new() with those types.
2023-04-26 21:03:34 +02:00
Benjamin Otte
03d7ce3287
wayland: Set default title in toplevel_init()
2023-04-26 21:03:34 +02:00
Benjamin Otte
f2083d36a1
macos: Add surface from ::constructed()
2023-04-26 21:03:34 +02:00
Benjamin Otte
cb642bec25
gdk: Remove GDK_SURFACE_DRAG enum member
...
I want to remove the whole enum, but this value was used all over the
place. So removing it first ensures I didn't forget anything.
2023-04-26 21:03:34 +02:00
Benjamin Otte
8c530264f7
wayland: Create drag surface directly
...
... instead of going through create_surface().
2023-04-26 21:03:34 +02:00
Benjamin Otte
d99042dd91
wayland: Remove struct member
...
It's unused.
2023-04-26 21:03:34 +02:00
Benjamin Otte
486196c979
x11: Add private gdk_x11_drag_surface_new()
...
... and use it.
2023-04-26 21:03:34 +02:00
Benjamin Otte
83faacabe3
x11: Set frame clock in ::constructed
2023-04-26 21:03:34 +02:00
Benjamin Otte
31aae62f9a
x11: Move window construction to ::constructed()
2023-04-26 21:03:34 +02:00
Benjamin Otte
726be8e2b2
broadway: Create gdk_broadway_drag_surface_new()
...
... and use it.
2023-04-26 21:03:34 +02:00
Benjamin Otte
ab0fa08d8e
win32: Create gdk_win32_draw_surface_new()
...
... and use it.
2023-04-26 21:03:34 +02:00
Benjamin Otte
42cea18f3e
macos: Set frame clock in ::constructed
2023-04-26 21:03:34 +02:00
Benjamin Otte
44e54e1b4c
broadway: Set frame clock in ::constructed
...
... instead of passing it to g_object_new().
2023-04-26 21:03:34 +02:00
Benjamin Otte
a79ae95e7e
broadway: Move surface init code into ::constructed()
2023-04-26 21:03:34 +02:00
Benjamin Otte
77fe9116af
win32: Set frame clock in constructed()
...
... instead of passing it as construct argument.
2023-04-26 21:03:34 +02:00
Benjamin Otte
808cde74be
wayland: Construct the frame clock in the surface
...
... instead of passing it to g_object_new().
2023-04-26 21:03:34 +02:00
Benjamin Otte
13120ccf9d
surface: Make gdk_surface_set_frame_clock() available
...
... to backends.
That way, frame clocks can be constructed by the backends' surface
implementations and dont need to be passed in as construct arguments.
Also add an assertion that they are indeed constructed.
2023-04-26 21:03:34 +02:00
Benjamin Otte
a306401023
macos: Move native window creation to ::constructed()
...
That way, it doesn't need a specific init function.
Also chain up last, so that the generic initialization code in
GdkSurface::constructed can access a fully initialized macos surface.
2023-04-26 21:03:34 +02:00
Benjamin Otte
7e18a1cea7
macos: Don't pass sizes to macos_surface_new()
...
They're 0, 0, 100, 100 always, so just use those values everywhere.
2023-04-26 21:03:34 +02:00
Benjamin Otte
9a6e6be785
macos: Create drag surface directly
...
Do not go via macos_surface_new().
2023-04-26 21:03:34 +02:00
Benjamin Otte
093a4e83d5
macos: Move construction stuff into ::constructed
2023-04-26 21:03:34 +02:00
Benjamin Otte
428798b53f
macos: toplevels have no parent
2023-04-26 21:03:34 +02:00
Benjamin Otte
4fa81cf70f
win32: Move surface init code into ::constructed()
2023-04-26 21:03:34 +02:00
Benjamin Otte
9ac31fe0a0
win32: Abort on error
...
Returning NULL from a function that must not return NULL is not a good
idea.
2023-04-26 21:03:34 +02:00
Benjamin Otte
69fabb3ce9
win32: Remove outdated debug messages
...
They are not needed anymore as they print stuff that's no decided in
that function anymore.
2023-04-26 21:03:34 +02:00
Benjamin Otte
f59c230a96
win32: Move toplevel signal into the toplevel class
2023-04-26 21:03:34 +02:00
Benjamin Otte
80d99b893e
broadway: Pass parent as a construct argument
2023-04-26 21:03:34 +02:00
Benjamin Otte
cbe89b955a
x11: Get rid of sizes when constructing surfaces
...
Just call XCreateWindow with 0, 0, 1, 1 size.
2023-04-26 21:03:34 +02:00
Benjamin Otte
2d827978a6
x11: Remove unused variable
2023-04-26 21:03:34 +02:00
Benjamin Otte
b2e304189e
wayland: Move surface initialization into constructed()
...
That way, it doesn't ned a specific init function.
Also chain up last, so that the generic initialization code can access a
fully initialized wayland surface.
2023-04-26 21:03:34 +02:00
Benjamin Otte
35c2d85468
wayland: Move toplevel-specific code into the toplevel
...
The display->toplevels tracking belongs to GdkWAylandToplevel.
2023-04-26 21:03:34 +02:00
Benjamin Otte
7ef5f6ef1a
display: Remove x/y/w/h from create_surface()
2023-04-26 21:03:34 +02:00
Matthias Clasen
9364da673f
Merge branch 'application-signal-cleanup' into 'main'
...
application: Clean up signal handlers
See merge request GNOME/gtk!5872
2023-04-26 13:11:43 +00:00
Matthias Clasen
c87b193d2a
application: Clean up signal handlers
...
This is the right thing to do and might help for #5775 .
2023-04-26 14:15:31 +02:00
Matthias Clasen
045ab0f107
Merge branch 'win32-warnings' into 'main'
...
Fix some win32 warnings
See merge request GNOME/gtk!5868
2023-04-26 06:58:09 +00:00
Matthias Clasen
27d9023ac8
Merge branch 'pathbar-webdav-root' into 'main'
...
pathbar: Handle webdav where is the root is a path
Closes #2866
See merge request GNOME/gtk!5830
2023-04-26 06:50:10 +00:00
Matthias Clasen
8a82e1b8b4
Merge branch 'matthiasc/for-main' into 'main'
...
gsk: Don't misuse bitwise operators
See merge request GNOME/gtk!5869
2023-04-26 06:49:32 +00:00
Matthias Clasen
8e695f7c56
Merge branch 'modelbutton-no-click-outside' into 'main'
...
gtkmodelbutton: Ignore releases outside of the button
Closes #5760
See merge request GNOME/gtk!5852
2023-04-26 05:56:31 +00:00
Fran Dieguez
1f886668ce
Update Galician translation
...
(cherry picked from commit 7470bc01f2
)
2023-04-25 23:22:28 +00:00
Sebastian Keller
a678e9fdd9
gtkmodelbutton: Ignore releases outside of the button
...
This is also how regular buttons behave. Otherwise releasing on a
different menu item would register a click on the item that was
originally pressed. In these cases it is better to not register a click
at all.
Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/5760
2023-04-25 19:28:42 +02:00
Matthias Clasen
74c0171edf
gsk: Don't misuse bitwise operators
...
We should use && for booleans, not &=.
2023-04-25 16:43:02 +02:00
Matthias Clasen
248d13d8dc
Merge branch 'matthiasc/for-main' into 'main'
...
gsk: Don't misuse bitwise operators
See merge request GNOME/gtk!5867
2023-04-25 12:48:13 +00:00
Marc-André Lureau
2d11d3f8d3
gtk/win32: fix usage of deprecated function
...
[106/939] Compiling C object gtk/libgtk.a.p/gtkimcontextime.c.obj
../gtk/gtkimcontextime.c: In function 'gtk_im_context_ime_set_preedit_font':
../gtk/gtkimcontextime.c:780:3: warning: 'gtk_widget_get_style_context' is deprecated [-Wdeprecated-declarations]
780 | font_desc = gtk_css_style_get_pango_font (gtk_style_context_lookup_style (gtk_widget_get_style_context (context_ime->client_widget)));
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
2023-04-25 16:37:58 +04:00
Marc-André Lureau
ff9cd989c6
gdk/win32: fix defined but not used warnings
...
[30/1038] Compiling C object gdk/win32/libgdk-win32.a.p/gdkmain-win32.c.obj
../gdk/win32/gdkmain-win32.c:146:1: warning: 'gdk_win32_finalize_ole' defined but not used [-Wunused-function]
146 | gdk_win32_finalize_ole (void)
| ^~~~~~~~~~~~~~~~~~~~~~
../gdk/win32/gdkmain-win32.c:113:1: warning: 'gdk_win32_finalize_com' defined but not used [-Wunused-function]
113 | gdk_win32_finalize_com (void)
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
2023-04-25 16:37:58 +04:00
Marc-André Lureau
5b69df96fe
gdk/win32: fix hr
set but not used
...
A number of warnings are produced:
[23/1038] Compiling C object gdk/win32/libgdk-win32.a.p/gdkinput-dmanipulation.c.obj
../gdk/win32/gdkinput-dmanipulation.c: In function 'reset_viewport':
../gdk/win32/gdkinput-dmanipulation.c:354:11: warning: variable 'hr' set but not used [-Wunused-but-set-variable]
354 | HRESULT hr;
| ^~
Try to do something sensible instead.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
2023-04-25 16:37:58 +04:00
Marc-André Lureau
d8ead56b9c
gdk/win32: fix g_string_free warning
...
../gdk/win32/gdkclipdrop-win32.c: In function 'transmute_cf_shell_id_list_to_text_uri_list':
C:/msys64/ucrt64/include/glib-2.0/glib/gstring.h:72:5: warning: ignoring return value of 'g_string_free_and_steal' declared with attribute 'warn_unused_result' [-Wunused-result]
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
2023-04-25 16:14:57 +04:00
Marc-André Lureau
0e2d7111eb
gdk/win32: fix GDK_NOTE redefined warning
...
In file included from ../gdk/win32/gdkdrag-win32.c:201:
../gdk/win32/gdkprivate-win32.h:45: warning: "GDK_NOTE" redefined
45 | #define GDK_NOTE(type,action) \
|
../gdk/win32/gdkdrag-win32.c:40: note: this is the location of the previous definition
40 | #define GDK_NOTE(a,b)
Fixes: bc159207bd
("gdk: Drop old debug macros")
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
2023-04-25 16:11:11 +04:00
Matthias Clasen
2263db6259
gsk: Don't misuse bitwise operators
...
We should use || for booleans, not |=.
2023-04-25 13:45:37 +02:00
Matthias Clasen
ec318e911c
Merge branch 'label_get_active_uri' into 'main'
...
Fix hovered link URI not returned by gtk_label_get_current_uri
See merge request GNOME/gtk!5864
2023-04-25 11:22:34 +00:00
Matthias Clasen
ed69435a1b
Merge branch 'icontheme-has-icon-consistency' into 'main'
...
icontheme: make has_(g)icon consistent with lookup
Closes #5709
See merge request GNOME/gtk!5865
2023-04-25 07:49:12 +00:00
Matthias Clasen
e111f688c2
Merge branch 'null-display' into 'main'
...
gdkdisplaymanager: Add missing nullable to display name
See merge request GNOME/gtk!5866
2023-04-25 07:46:21 +00:00
Takao Fujiwara
26e3824d1d
gdkdisplaymanager: Add missing nullable to display name
2023-04-25 12:08:08 +09:00
velsinki
e20a5e1bc1
icontheme: make has_(g)icon consistent with lookup
...
Make `gtk_icon_theme_has_icon` and `gtk_icon_theme_has_gicon` also
consider unthemed icons. This makes their behavior consistent with the
actual (documented) lookup behavior.
Fixes : #5709 and makes the workaround in nautilus@b643a00b obsolete
2023-04-24 23:38:20 +02:00
Chris Mayo
66cfeb3ad1
Fix hovered link URI not returned by gtk_label_get_current_uri
...
This is needed for a query-tooltip handler, as mentioned in the
documentation, when there has been a hover timeout.
Maintain the previous behaviour when the link is clicked and follow the
existing documentation regarding selectable labels.
A notify::cursor handler can now also be used to retrieve the URI of the
link under the cursor.
2023-04-24 19:35:47 +01:00
Matthias Clasen
63d7756658
Merge branch 'ebassi/button-can-shrink' into 'main'
...
Add GtkButton:can-shrink
See merge request GNOME/gtk!5552
2023-04-24 12:28:12 +00:00
Emmanuele Bassi
e28676869e
Add GtkMenuButton:can-shrink
...
Map the GtkMenuButton property to the underlying GtkButton widget.
2023-04-24 11:09:01 +01:00
Sabri Ünal
fabfc1eefa
Update Turkish translation
2023-04-23 21:12:44 +00:00
Benjamin Otte
72016341c6
Merge branch 'wip/otte/for-main' into 'main'
...
surface: Clean up drawing code
See merge request GNOME/gtk!5861
2023-04-22 15:10:02 +00:00
Benjamin Otte
104b5ef157
surface: reformat function
...
Make the function follow usual coding conventions.
And while doing that, remove duplicate functionality.
2023-04-22 16:35:16 +02:00
Benjamin Otte
893862a51a
surface: Refactor code
...
Move the early exit conditions to the top and turn them into early exits
instead of nesting if statements.
2023-04-22 16:33:35 +02:00
Benjamin Otte
823eb4c6d9
surface: Fold function into its only caller
...
No other changes
2023-04-22 16:29:58 +02:00
Benjamin Otte
be0ed15b40
surface: Stop maintaining an unused linked list
...
wat?
2023-04-22 16:27:27 +02:00
Benjamin Otte
040af44b00
surface: Remove in_update tracking
...
It's 2023, we use frame clocks now and don't have nested surface drawing
anymore.
2023-04-22 16:24:16 +02:00
Benjamin Otte
4154f87418
surface: Stop tracking the active update area
...
It's unused.
2023-04-22 16:10:24 +02:00
Aleksandr Melman
27e3ac5fc5
Update Russian translation
2023-04-22 12:03:07 +00:00
Piotr Drąg
eaaddd2647
Update Polish translation
2023-04-22 11:16:24 +02:00
Matthias Clasen
6d0659a83a
Merge branch 'gtkfilesystemmodel-emit-items-changed-on-modifying-attributes' into 'main'
...
filesystemmodel: Emit items-changed when modifying attributes
Closes #5758
See merge request GNOME/gtk!5853
2023-04-22 05:54:58 +00:00
Olivier Crête
0ce6bc677e
filesystemmodel: Emit items-changed when modifying attributes
2023-04-22 05:54:57 +00:00
Matthias Clasen
b579a39a47
Merge branch 'wip/corey/file-chooser-signal' into 'main'
...
Port filechooserwidget to GtkSignalListItemFactory
See merge request GNOME/gtk!5858
2023-04-22 05:26:43 +00:00
Corey Berla
aeaaead2bd
filechoosercell: Drop show-time property
...
Now that we are using GtkSignalListItemFactory, the convoluted show-time
property is no longer necessary.
2023-04-21 08:14:32 -07:00
Corey Berla
056237fc04
filechooserwidget: Port to GtkSignalListItemFactory
...
BuilderListItemFactory isn't quite suited for our purposes, primarily
because you can't pass user data to BuilderListItemFactory. Because
we can't get the data we are using a workaround to get the
GtkFileChooserWidget ancestory, which used to work, but with the
recent list view changes no longer doesn't. Use GtkSignalListItemFactory
with the GtkFileChooserWidget as the user data.
2023-04-21 08:14:32 -07:00
Corey Berla
1a7e808c27
Revert "filechooser: Set date and time after cell is a child of filechooserwidget"
...
This reverts commit 2a70093a30
.
This fix was incomplete, the actual fix is to use signal factory.
2023-04-21 08:14:24 -07:00
Corey Berla
3de47fa5c6
Revert "filechoosercell: Store type_format in filechoosercell"
...
This reverts commit dd407dab00
.
This fix was incomplete, the actual fix is to use signal factory.
2023-04-21 08:14:14 -07:00
Hugo Carvalho
9f7c8f7d42
Update Portuguese translation
...
(cherry picked from commit 5bc3284dd8
)
2023-04-21 14:30:55 +00:00
Yosef Or Boczko
feb3254a6a
Update Hebrew translation
2023-04-21 09:10:12 +00:00
Benjamin Otte
03b71a9759
Merge branch 'wip/otte/for-main' into 'main'
...
testsuite: Be less verbose in accessor-apis test
Closes #5763
See merge request GNOME/gtk!5851
2023-04-20 21:50:44 +00:00
Benjamin Otte
f393f70ee2
listbase: Don't warn on scroll in empty list
...
Empty lists can still be scrolled if the scroll happens in the same
frame as the emptying of the list.
Related: #5763
2023-04-20 23:33:28 +02:00
Benjamin Otte
75c47755e3
adjustment: sanity-check values when setting them
...
It's not enough to sanitize values when starting an animation, as the
adjustment can reconfigure itself while the animation runs.
So as a simple way to handle this, we sanitize every value right before
setting it, too.
In the future we might also want to look at sanitizing start/end values
of the animation.
Fixes #5763
2023-04-20 23:33:28 +02:00
Benjamin Otte
e47c076048
adjustment: Split out a function
2023-04-20 23:33:28 +02:00
Matthias Clasen
6ecd57eba8
Merge branch 'dark_theme_fix_hover_toolbar_buttons' into 'main'
...
theme: fix 'hover' and 'check' colors for buttons under .toolbar
See merge request GNOME/gtk!5844
2023-04-20 20:08:31 +00:00
Matthias Clasen
8b3831d43a
Merge branch 'dark_theme_increase_selection_color' into 'main'
...
Increase contrast for text entry selection color on dark theme
See merge request GNOME/gtk!5843
2023-04-20 20:08:01 +00:00
Benjamin Otte
39583e40ef
testsuite: Allow accessors in interfaces
...
There are a lot of cases where properties are implemented in classes but
the getters for these exist in an interface that class implements.
A common Example is g_list_model_get_n_items() being the getter for
GtkWhateverListModel::n-items.
But also property implementations that don't use override_property()
(usually because they have a different default) are handled by this.
2023-04-20 17:47:54 +02:00
Benjamin Otte
be5f225022
testsuite: Be less verbose in accessor-apis test
...
Only print the tried names when --verbose is passed to the test.
2023-04-20 17:47:54 +02:00
Emin Tufan Çetin
427ed50759
Update Turkish translation
2023-04-19 13:22:31 +00:00
Matthias Clasen
9892243df6
Merge branch 'mask-node-transforms' into 'main'
...
Fix a comment
See merge request GNOME/gtk!5848
2023-04-19 07:44:45 +00:00
Matthias Clasen
83091c4f15
gsk: Use explicit switches
...
This makes it harder to forget to add new
node types here.
2023-04-19 09:19:12 +02:00
Matthias Clasen
503a5de7d1
gsk: Mask nodes support 2d transforms
...
When adding mask nodes, I overlooked that
we have two separate functions for determining
what transforms a node supports without offlines.
Since we claim that mask nodes support general
transform, they must certainly support 2d transforms
as well.
2023-04-19 08:13:55 +02:00
Matthias Clasen
d7d75f0b26
Fix a comment
...
I tried to improve things in d67101d46e
,
but I made it worse. The original note was meant
to be removed. Pointed out be Sebastian Bacher.
2023-04-19 07:49:36 +02:00
Benjamin Otte
40ac37245d
Merge branch 'angle-gles' into 'main'
...
gdk: prefer GLES when on win32/ANGLE
See merge request GNOME/gtk!5829
2023-04-17 11:56:03 +00:00
Marc-André Lureau
250414d6b3
gdk/win32: drop some unused variables
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
2023-04-17 04:50:17 +00:00
Marc-André Lureau
d69cdf6c05
gdk: drop libangle GLES minimum version
...
GLES 2.0 version is fine now with current gtk according to B. Otte.
Let's use the same minimum requirement for all implementations.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
2023-04-17 04:50:17 +00:00
Marc-André Lureau
9532657fa2
gdk: use GLES when on win32/ANGLE
...
When using GDK_DEBUG=gl-egl, we end up using GL, but that is not well supported:
Creating EGL context version 3.0 (debug:no, forward:no, legacy:yes, es:no)
Created EGL context[0000000000000004]
OpenGL version: 0.0 (legacy)
* GLSL version: (NULL)
* Max texture size: -1059701680
* Extensions checked:
- GL_KHR_debug: no
- GL_EXT_unpack_subimage: yes
- OES_vertex_half_float: no
** (gtk4-demo.exe:14324): WARNING **: 19:16:41.468: Compile failure in
vertex shader:
ERROR: 0:7: 'gl_Position' : undeclared identifier
---8<---
Use GLES when EGL implementation is ANGLE.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
2023-04-17 04:50:17 +00:00
Marc-André Lureau
3cb2115212
gdk: drop unused vertex_array_object
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
2023-04-17 04:50:17 +00:00
Benjamin Otte
dd7c85adc3
Merge branch 'wip/otte/for-main' into 'main'
...
glrenderer: Don't try to use float framebuffers on GLES2
See merge request GNOME/gtk!5845
2023-04-17 04:49:59 +00:00
Benjamin Otte
8965d6c7f8
gl: Only allow RGB(A)8 on GLES2
...
GLES2 has no idea what 16bit textures even are, let alone floating point.
2023-04-17 05:57:44 +02:00
Benjamin Otte
d7309a009c
glrenderer: Don't try to use float framebuffers on GLES2
...
GLES doesn't know what that is.
2023-04-17 05:57:44 +02:00
Nelson Benítez León
bd9b117517
theme: more contrast for text entry selection color on dark theme
...
Part of #5725
2023-04-16 16:33:54 -04:00
Nelson Benítez León
a309a56acf
theme: fix 'hover' and 'check' colors for buttons under .toolbar
...
Buttons under .toolbar were using for their 'hover', 'active'
and 'check' colors the default ones from %button_basic_flat
which are very dimmed, so we explicitly darken them.
Part of #5725
2023-04-16 16:16:10 -04:00
Matthias Clasen
b6fac448d7
Merge branch 'matthiasc/for-main' into 'main'
...
Try harder to fix focus tests
See merge request GNOME/gtk!5842
2023-04-16 20:00:46 +00:00
Matthias Clasen
765f55dfbe
testsuite: Skip focus tests when necessary
...
If our window does not get focus, we can't reliably
test things that depend on widgets being focused.
2023-04-16 20:58:26 +02:00
Matthias Clasen
bebaad3e1f
Merge branch 'ccook/doc-changes' into 'main'
...
Two corrections that show up in docs
See merge request GNOME/gtk!5838
2023-04-16 18:16:36 +00:00
Matthias Clasen
db6a116d49
Try harder to fix focus tests
...
The focus test now asserts that its window is active.
So we should not run them in parallel with other tests,
since those might steal the focus.
2023-04-16 20:08:03 +02:00
Benjamin Otte
a299656c60
Merge branch 'wip/otte/alt.wl_surface.die.die.die' into 'main'
...
wayland: Don't leak all surfaces
See merge request GNOME/gtk!5840
2023-04-16 18:02:33 +00:00
Benjamin Otte
27fd0b907d
testsuite: Fix broken test to not unref surfaces twice
...
The test doesn't hold 2 references, it holds only one.
The reason one unref can cause a leak is that some backends - like X11 -
only destroy the surface once the DestroyNotify event from the X server
has come in.
2023-04-16 19:28:21 +02:00
Benjamin Otte
62951c7277
wayland: Don't leak all surfaces
...
X11 does add an extra reference to surfaces that gets released when the
DestroyNotify event arrives.
Wayland doesn't ave such an event, so that reference never gets
released.
This fixes a copy/paste error introduced in commit 590f3dfa1f
.
2023-04-16 19:28:21 +02:00
Benjamin Otte
8e00f6e5e5
wayland: Don't insta-crash when a surface gets disposed
...
We want to remove the event queue from the list of event queues, not the
surface.
Otherwise the freed queue stays in the list and the next time an event
comes in, we access invalid memory.
Fixes thinko introduced in commit 7fafa5133b
.
Luckily, we leak all surfaces, so this problem never occured.
2023-04-16 19:28:21 +02:00
Matthias Clasen
ff141a1ed4
Merge branch 'ccook/gtklabel-doc-changes' into 'main'
...
GtkLabel doc corrections
See merge request GNOME/gtk!5839
2023-04-16 17:07:49 +00:00
Matthias Clasen
25a10f502e
Merge branch 'focus-testsuite-fixes' into 'main'
...
text: Fix fallout from focus changes
See merge request GNOME/gtk!5841
2023-04-16 07:36:11 +00:00
Matthias Clasen
585fb497c1
testsuite: Actually wait for focus
...
We were failing to properly iterate the main
context here. Oops.
2023-04-16 09:11:24 +02:00
Matthias Clasen
c57e5811f1
tests: Check is-focus instead of has-focus
...
We are not presenting windows here.
2023-04-16 08:50:35 +02:00
Matthias Clasen
940a2b6923
text: Fix fallout from focus changes
...
We don't get proper notification for when the toplevel
is-active property changes, so monitor has-focus, and
update cursor blinking.
2023-04-16 08:49:20 +02:00
Cam Cook
3277e2ee3e
| method | current | suggestion |
...
|---------------------------------------------------------------------------------------|-----------------------------------------------------------------|----------------------------------------------------------------------|
| [get_attributes](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtklabel.c#L3242 ) | "use`pango_layout_get_attribute (gtk_label_get_layout (self))`" | "use`pango_layout_get_attributes (gtk_label_get_layout (self))`" [1] |
| [set_yalign](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtklabel.c#L5897 ) | "(attributes org.gtk.Method.get_property=yalign)" | "(attributes org.gtk.Method.set_property=yalign)" |
| [get_yalign](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtklabel.c#L5923 ) | "(attributes org.gtk.Method.set_property=yalign)" | "(attributes org.gtk.Method.get_property=yalign)" |
| [set_ellipsize](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtklabel.c#L3892 ) | "to ellipsizei" | "to ellipsize" |
| [get_attributes](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtklabel.c#L3239 ) | "from the labels markup" | "from the label's markup" |
[1] https://docs.gtk.org/Pango/method.Layout.get_attributes.html
2023-04-15 21:48:27 -04:00
Cam Cook
3e8489fea5
| method | current | suggestion |
...
|-------------------------------------------------------------------------------------------------|------------------------------------------------------------|-----------------------------------------------------------|
| [Entry/set_invisible_char](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkentry.c#L2101 ) | "(attributes org.gtk.Method.sets_property=invisible-char)" | "(attributes org.gtk.Method.set_property=invisible-char)" |
| [FlowBox::activate](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkflowbox.c#L541 ) | "This can be happen either by" | "This can happen either by" |
2023-04-15 12:41:13 -04:00
Cam Cook
1035640020
Revert "Two corrections and added method linking that show up in docs"
...
This reverts commit c7f30ecdfd
.
2023-04-15 12:40:22 -04:00
Matthias Clasen
6cee73d100
Merge branch 'wip/otte/gles-fixes' into 'main'
...
GLES 2 fixes
See merge request GNOME/gtk!5837
2023-04-15 16:27:16 +00:00
Matthias Clasen
e4c43901c1
Merge branch 'matthiasc/for-main' into 'main'
...
window: Don't mark widget prematurely as has-focus
See merge request GNOME/gtk!5836
2023-04-15 16:09:32 +00:00
Cam Cook
c7f30ecdfd
Two corrections and added method linking that show up in docs
...
| method | current | suggestion |
|-------------------------------------------------------------------------------------------------|------------------------------------------------------------|-----------------------------------------------------------|
| [Entry/set_invisible_char](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkentry.c#L2101 ) | "(attributes org.gtk.Method.sets_property=invisible-char)" | "(attributes org.gtk.Method.set_property=invisible-char)" |
| [FlowBox::activate](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkflowbox.c#L541 ) | "This can be happen either by" | "This can happen either by" |
| method | current | suggestion |
|-----------------------------------------------------------------------------------------------------------|--------------------------------------------------------|--------------------------------------------------------------|
| [Box/get_baseline_position](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkbox.c#L461 ) | "value set by gtk_box_set_baseline_position()." | "value set by [method@Gtk.Box .set_baseline_position]." |
| [Box/get_spacing](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkbox.c#L412 ) | "value set by gtk_box_set_spacing()." | "value set by [method@Gtk.Box .set_spacing]." |
| [CenterBox/get_baseline_position](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkcenterbox.c#L528 ) | "value set by gtk_center_box_set_baseline_position()." | "value set by [method@Gtk.CenterBox .set_baseline_position]." |
| [Entry/get_activates_default](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkentry.c#L2296 ) | "value set by gtk_entry_set_activates_default()." | "value set by [method@Gtk.Entry .set_activates_default]." |
| [Entry/get_alignment](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkentry.c#L2380 ) | "value set by gtk_entry_set_alignment()." | "value set by [method@Gtk.Entry .set_alignment]." |
| [Entry/get_extra_menu](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkentry.c#L3727 ) | "set with gtk_entry_set_extra_menu()." | "set with [method@Gtk.Entry .set_extra_menu]." |
| [Entry/get_has_frame](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkentry.c#L2340 ) | "value set by gtk_entry_set_has_frame()." | "value set by [method@Gtk.Entry .set_has_frame]." |
| [Entry/get_progress_pulse_step](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkentry.c#L3372 ) | "set with gtk_entry_set_progress_pulse_step()." | "set with [method@Gtk.Entry .set_progress_pulse_step]." |
| [Fixed/get_child_transform](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkfixed.c#L314 ) | "set using gtk_fixed_set_child_transform()." | "set using [method@Gtk.Fixed .set_child_transform]." |
2023-04-15 12:08:46 -04:00
Benjamin Otte
b64f7050ba
testsuite: Make GLES testsuite run use GLES 2
...
We want to support GLES 2, so make sure we test that support.
Also force-disable common extensions we don't explicitly check for and
don't want to accidentally use.
2023-04-15 17:55:20 +02:00
Benjamin Otte
d37b9619e2
gles: Don't use vertex array objects
...
They're not needed and GLES doesn't technically support them, even
though GTK had been using them via epoxy sneakily using the
GL_OES_vertex_array_object extension behind our back.
2023-04-15 17:55:20 +02:00
Matthias Clasen
4a22e681b3
text: Only claim primary when focused
...
It does not make sense otherwise, and has unfortunate
side-effects on Wayland.
2023-04-15 15:02:52 +02:00
Matthias Clasen
189aced844
wayland: Improve logging for primary selection
2023-04-15 15:02:52 +02:00
Matthias Clasen
d90cb02570
window: Don't mark widget prematurely as has-focus
...
has-focus is defined is-focus && toplevel::is-active.
We were forgetting to look at is_active when handling
focus widget changes.
2023-04-15 14:58:57 +02:00
Matthias Clasen
4246c7bafd
Merge branch 'better-snapshot-nodes-docs' into 'main'
...
gtk: Improve documentation on returned nodes for snapshot
Closes #5747
See merge request GNOME/gtk!5831
2023-04-15 10:51:39 +00:00
Matthias Clasen
d67101d46e
Tweak the wording
2023-04-15 10:35:12 +00:00
Benjamin Otte
60f3cc398a
Merge branch 'wip/otte/for-main' into 'main'
...
inspector: Don't randomly emit application signals
See merge request GNOME/gtk!5834
2023-04-15 03:40:00 +00:00
Benjamin Otte
e010cd242c
listlistmodel: Add a cache
...
Cache the last looked up item and use it for looking up the next item if
it's closest. This massively speeds up iteration over the model, because
each call to get_item() will be adjacent to the previous one.
Improves performance of the inspector quite a bit.
2023-04-15 05:27:47 +02:00
Benjamin Otte
41454b63b4
testsuite: Add some more exhaustive testing to listlistmodel
2023-04-15 05:27:47 +02:00
Benjamin Otte
f458951745
inspector: Don't randomly emit application signals
...
When the variant-editor emits a callback, it might not actually have
edited the value in question. Try to detect that by only emitting
signals if the value changed.
2023-04-15 05:27:47 +02:00
Benjamin Otte
ef3793ec37
Merge branch 'gbsneto/vulkan-buffer-release' into 'main'
...
gsk/vulkan/render: Download image before reset
See merge request GNOME/gtk!5832
2023-04-14 23:28:55 +00:00
Georges Basile Stavracas Neto
94b1a78378
gsk/vulkan/render: Download image before reset
...
gsk_vulkan_render_download_target() currently resets the uploader
objects before downloading the image that it produces. This is
problematic because there might be unreleased buffers and images
in the command queue.
In particular, this can make validation layers complain about the
glyph atlas - of all things! - upload buffer being released while
still being used by the command queue.
Fix that by resetting the uploader after downloading the image.
2023-04-14 16:43:04 -03:00
Marco Trevisan (Treviño)
584fd36a5f
gtk: Improve documentation on returned nodes for snapshot
...
Closes : #5747
2023-04-14 18:05:21 +02:00
Emmanuele Bassi
4ea818fee6
Add GtkButton:can-shrink
...
For certain kinds of layouts, especially ones where one or both sizes of
a top level is constrained by physical limits, it's acceptable to have
buttons that rely on the minimum size of their contents, rather than the
natural size. It is left to the application authors, or the localization
teams, to ensure that things like translations and font sizes do not
result in a broken UI.
2023-04-14 15:00:07 +01:00
Olivier Crête
c271cd1a3f
pathbar: Handle webdav where is the root is a path
...
Our webdav server has a root which is davs://mynextcloud/remote.php/webdav
When once creates a GFile out of or out of a subdirectory, and one call
g_file_get_parent(), it recurses too far up and try to query
davs://mynextcloud/remote.php which fails, resulting in a broken pathbar.
To fix that, before querying the metadata of each element of the path,
I query the "enclosing mount", then use it's root to compare the GFile
against.
With the right GMount, we can also fix the icon drawing code in the
pathbar for network drives.
2023-04-13 17:54:57 -06:00
Matthias Clasen
64a1969293
Merge branch 'fix_scalebutton_orientation' into 'main'
...
ScaleButton: fix CSS name in documentation, fix orientation doing nothing
See merge request GNOME/gtk!5819
2023-04-13 20:44:23 +00:00
Matthias Clasen
2baab9732c
Merge branch 'check-openuri-portal-version' into 'main'
...
openuriportal: Detect if the interface isn't there
Closes #5733
See merge request GNOME/gtk!5826
2023-04-13 20:44:03 +00:00
Georges Basile Stavracas Neto
8134daf843
Merge branch 'gbsneto/vulkan-mailbox' into 'main'
...
gdk/vulkancontext: Use more appropriate present mode
See merge request GNOME/gtk!5828
2023-04-13 17:07:59 +00:00
Georges Basile Stavracas Neto
9c013d40c1
gdk/vulkancontext: Use more appropriate present mode
...
Check if the driver supports MAILBOX and prefer using it; in its
absense, checkif the driver supports IMMEDIATE and prefer using
it; finally, if neither of them are supported, use the guaranteed
to be supported FIFO mode.
2023-04-13 13:54:45 -03:00
Benjamin Otte
d798372a53
Merge branch 'wip/otte/for-main' into 'main'
...
x11: Remove commented outdated code
See merge request GNOME/gtk!5827
2023-04-13 15:34:48 +00:00
Benjamin Otte
cfaf1b3e71
x11: Remove commented outdated code
...
... and it's copy/paste into the win32 backend
2023-04-13 17:15:35 +02:00
Benjamin Otte
9763d83a9d
gdk: Remove unused vfunc
2023-04-13 17:15:35 +02:00
Benjamin Otte
5f82a496cb
Merge branch 'wip/otte/wl-gloria-gaynor' into 'main'
...
wayland: Make wl_surface survive until surface is desstroyed
See merge request GNOME/gtk!5825
2023-04-13 15:12:07 +00:00
Matthias Clasen
0c35015c44
Merge branch 'wip/exalm/print-dialog' into 'main'
...
printunixdialog: Remove a redundant style class
See merge request GNOME/gtk!5823
2023-04-13 05:39:08 +00:00
Matthias Clasen
3da0572078
openuriportal: Detect if the interface isn't there
...
Check the portal version number before trying to use
it. Most importantly, this will detect the case where
the interface isn't supported at all, since the proxy
will report a version of 0 in that case.
Fixes : #5733
2023-04-13 07:24:38 +02:00
Matthias Clasen
c649d8a4ec
Merge branch 'bilelmoussaoui/g-i' into 'main'
...
g-i: Fix GtkGLArea type name
See merge request GNOME/gtk!5824
2023-04-13 04:37:45 +00:00
Benjamin Otte
75bea01a86
wayland: Keep EGL window around when hidden
...
See previous commit:
We want to keep resources around as long as the surface exists.
2023-04-13 05:19:18 +02:00
Benjamin Otte
5d3cec5441
wayland: Don't destroy the wl_surface on hide()
...
We want to keep the wl_surface around, because surfaces create their
resources on construct and keep them until destroyed. See the HWND ond
Windows and the XWindow on X11.
This is relevant for graphics resources, where we want to have access
to the VkSurface and eglSurface while the GdkSurface is hidden.
We also want these surfaces to be permanent and not change during the
lifetime of the GdkSurface.
What we can - and must - destroy however are the xdg surfaces, because
those handle visibility on screen.
And we also need to ensure no buffer is attached, so that during the
next creation of the xdg surface we don't get a protocol error.
2023-04-13 04:23:35 +02:00
Benjamin Otte
891242920e
wayland: Split out a function
...
We have a create_wl_surface(), create a matching destroy_wl_surface().
2023-04-13 02:56:12 +02:00
Benjamin Otte
b375f17f09
wayland: Remove useless function
...
gdk_wayland_surface_maybe_resize() just calls
gdk_wayland_surface_update_size(), so make all callers call that one
instead.
The check that it does is done by the other function again.
2023-04-13 02:48:47 +02:00
Benjamin Otte
ec69990126
wayland: Remove an old workaround
...
This workaround - were it ever to trigger - is broken today. It destroys
the wl_surface and all associated structs but does not recreate the
xdg_popup or xdg_toplevel struct, so it would cause a hidden window.
The workaround looked a lot different when it was introduced in commit
83b54bab57
, too - both in what it did and
in what the vfuncs did that it called.
2023-04-13 02:44:05 +02:00
Bilal Elmoussaoui
aec5a5739e
g-i: Fix GtkGLArea type name
2023-04-12 18:12:40 +00:00
Alexander Mikhaylenko
ac9e0039b8
printunixdialog: Remove a redundant style class
...
.view does absolutely nothing in Default style since the whole box is
covered with a GtkNotebook which has its own background, and adds an
unwanted background onto the tab strip in Adwaita.
2023-04-12 21:09:25 +04:00
Matthias Clasen
4574b21fd6
Merge branch 'dialogs-force-window-destruction' into 'main'
...
gtk/dialogs: Destroy the window promptly on finish async function
Closes #5741
See merge request GNOME/gtk!5820
2023-04-12 13:54:13 +00:00
Marco Trevisan (Treviño)
31c5961c4f
gtk/dialogs: Destroy the window promptly on finish async function
...
Some bindings (GJS!) could add temporary references to the GAsyncResult
argument that we return, and thus to the GTask, which may cause the
dialog not to close when the finish function is called (but at garbage
collection instead!).
To prevent this, just manually destroy the window (by removing the task
data), so that we are not bound to the GTask lifetime anymore.
Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/5741
2023-04-12 15:39:39 +02:00
Matthias Clasen
8fc3f06155
Merge branch 'filechooserentry-fixes' into 'main'
...
filechooserentry: Make filtering work again
Closes #5743
See merge request GNOME/gtk!5822
2023-04-12 10:38:04 +00:00
Matthias Clasen
5327203201
Merge branch 'wip/carlosg/multi-click-text-view' into 'main'
...
textview: Reset press counter if double/triple clicking on a different line
See merge request GNOME/gtk!5821
2023-04-12 10:11:16 +00:00
Matthias Clasen
8442fce962
Merge branch 'touch-no-double-click-threshold' into 'main'
...
gestureclick: Don't use threshold for touch
Closes #5580
See merge request GNOME/gtk!5798
2023-04-12 10:10:31 +00:00
Matthias Clasen
d8b46c16cc
Merge branch 'stylus-fixes' into 'main'
...
gtk-demo: Test stylus-only mode
See merge request GNOME/gtk!5804
2023-04-12 10:10:11 +00:00
Matthias Clasen
4df7273266
filechooserentry: Plug a memory leak
2023-04-12 12:09:02 +02:00
Matthias Clasen
2b8fd89fd5
filechooserentry: Make filtering work again
...
We need to look at the filchooser::filtered-out
attribute to know which files the filesystem model
has filtered away.
Fixes : #5743
2023-04-12 12:08:43 +02:00
Carlos Garnacho
5b9a7863cf
textview: Reset press counter if double/triple clicking on a different line
...
If we click close enough between lines, and with the maximum distances applied
by GtkGestureClick we could jump between lines when handling double/triple
click for word/line selection.
Ensure that the whole operation stays in the same line and reset the
gesture/counter if we do move between lines, so we start from scratch in the
new line.
2023-04-12 11:27:41 +02:00
G.Willems
d625ff8106
scalebutton: fix orientation not applied to scale
2023-04-11 23:54:06 +02:00
G.Willems
5ecd8a1c10
scalebutton: fix CSS name in documentation
2023-04-11 22:06:54 +02:00
Matthias Clasen
e12669e230
gesture stylus: Fix condition
...
Now that the paint demo lets us test this, it has
become apparent that this condition is wrong, and
we don't get the expected events if stylus-only is
FALSE.
2023-04-09 08:35:03 -04:00
Matthias Clasen
7f906bef06
gtk-demo: Work without stylus
...
In the paint demo, don't assume that the event
backlog contains pressure. It won't, if we are
working with a plain old mouse.
2023-04-09 08:35:03 -04:00
Matthias Clasen
5970a14217
gtk-demo: Test stylus-only mode
...
Add a checkbutton to toggle the stylus-only
mode of GtkGestureStylus, so we can test this.
2023-04-09 08:35:03 -04:00
Matthias Clasen
5f4a6210c2
gestureclick: Use drag threshold for updates
2023-04-07 17:57:14 -04:00
Matthias Clasen
c0fa9e80aa
gestureclick: Don't use threshold for touch
...
When determining double-clicks, don't use the distance
threshold for touch events. It is very hard to double
touch reliably within a few pixels of the same position.
Fixes : #5580
2023-04-07 17:57:14 -04:00
Lukáš Tyrychtr
33e5d2c307
GtkShortcutsWindow: Allow a screen reader user to browse the available shortcuts
...
That required making the shortcuts focusable and with a meaningful
accessibility labels.
2022-09-21 15:34:17 +02:00
Hannes Müller
f23c124af2
Harmonize would_drop() replacement for g_log_writer_default_would_drop()
...
Reuse a better to read would_drop() from ./testsuite/reftests/gtk-reftest.c
in ./tools/gtk-builder-tool.c
Fixed wrong indentation in ./testsuite/reftests/gtk-reftest.c
2022-08-08 20:12:50 +02:00
vanadiae
b4b185d53d
builder: Clarify default "swapped" value when "object" is set for signals
...
I encountered this issue where I casted user_data to my self type, but it
showed me they were actually swapped when I set the "object" signal attribute.
After checking the source code which confirms this, it is a good idea to
properly document that convenient behaviour.
2022-02-24 23:04:20 +01:00