Commit Graph

69658 Commits

Author SHA1 Message Date
Emmanuele Bassi
a871a1bdb5 build: Don't append multiple flags as a string
The gtk_debug_cflags variable is an array, with each argument stored in
a separate string; if we add multiple arguments inside the same string
we break the escaping rules.

Fixes: #3864
2021-04-12 21:23:57 -04:00
Emmanuele Bassi
31e08d4629 gsk/ngl: Build with G_DISABLE_ASSERT enabled 2021-04-12 21:23:18 -04:00
Matthias Clasen
f98353c20b Force g_test_init to cooperate
Change all g_test_init calls in the testsuite
to avoid the macro, so they work regardless of
G_DISABLE_ASSERT.
2021-04-12 21:22:46 -04:00
Matthias Clasen
13ece4ee9b Make gtk_test_init work without assertions
The g_test_init macro 'helpfully' refuses to work when
assertions are disabled. So we just use the function.
2021-04-12 21:22:46 -04:00
Matthias Clasen
6e40f4f357 Remove assertions in tests 2021-04-12 21:22:46 -04:00
Matthias Clasen
ecfba2d31b Inspector: Fix a possible undefined use 2021-04-12 21:22:46 -04:00
Matthias Clasen
367dfee36e Fix unused variable warnings
These happen for variables which are only used
in assertions, when assertions are disabled.
2021-04-12 21:22:46 -04:00
Matthias Clasen
5e7b5fe085 gtk-demo: Avoid compiler warnings without assertions
Avoid an unused variable warning.
2021-04-12 21:22:46 -04:00
Matthias Clasen
9d3aa2cfce gsk: Avoid compiler warnings without assertions
Disabling assertions was provoking some unused variable
warnings from the compiler. Avoid these.
2021-04-12 21:22:46 -04:00
Matthias Clasen
8c156e6b80 testsuite: Reduce the use of g_assert
Stop using g_assert() in the gtk tests.
2021-04-12 21:22:46 -04:00
Matthias Clasen
4d1075a082 testsuite: Reduce the use of g_assert
Stop using g_assert() in the gsk tests.
2021-04-12 21:22:46 -04:00
Matthias Clasen
442f485591 Merge branch 'f16c.msvc' into 'master'
Fix F16C build/runtime detection on Visual Studio

See merge request GNOME/gtk!3429
2021-04-12 20:35:10 +00:00
Matthias Clasen
74238b5429 Merge branch 'testsuite-asserts' into 'master'
testsuite: Reduce use of g_assert

See merge request GNOME/gtk!3431
2021-04-12 12:47:09 +00:00
Matthias Clasen
f9fa92766b testsuite: Reduce use of g_assert
Stop using g_assert() in the css tests.
2021-04-12 08:33:41 -04:00
Matthias Clasen
90d187894d testsuite: Reduce use of g_assert
Stop using g_assert() in the reftests.
2021-04-12 08:30:56 -04:00
Matthias Clasen
03db2690e2 testsuite: Reduce use of g_assert
Stop using g_assert() in the gdk tests.
2021-04-12 08:18:00 -04:00
Chun-wei Fan
65b35457fd meson.build: Check for F16C on 32-bit Visual Studio
It is also possible to enable F16C instructions on 32-bit Visual Studio builds,
so also check for the compiler's ability to build F16C code on Visual Studio
32-bit instead of just bailing out.
2021-04-12 18:13:42 +08:00
Chun-wei Fan
d5ced21264 gsk/ngl/fp16.c: Implement runtime F16C detection on MSVC
We need to use __cpuid() to check for the presence of F16C instructions on
Visual Studio builds, and call the half_to_float4() or float_to_half4()
implementation accordingly, as the __builtin_cpu...() functions are strictly
for GCC or CLang only.

Also, since __m128i_u is not a standard intrisics type across the board, just
use __m128i on Visual Studio as it is safe to do so there for use for
_mm_loadl_epi64().

Like running on Darwin, we cannot use the alias __attribute__ as __attribute__
is also for GCC and CLang only.
2021-04-12 18:13:42 +08:00
Chun-wei Fan
6d6c8c59eb meson.build: Improve F16C detection on Visual Studio
The __builtin_cpu...() intrisics are strictly for GCC/CLang-based compilers, so
don't use them in the checking code on Visual Studio.  The test code will still
compile without this change, but will certainly fail if we want it to link.
2021-04-12 18:13:42 +08:00
Matthias Clasen
46ed7540b2 Merge branch 'ngl-shadow-fixes' into 'master'
ngl: Fix outset blurred shadows

See merge request GNOME/gtk!3427
2021-04-12 05:07:29 +00:00
Matthias Clasen
3ad56a762f Merge branch 'grouped-toggle-fix' into 'master'
togglebutton: Fix expected group behavior

See merge request GNOME/gtk!3425
2021-04-12 02:40:43 +00:00
Matthias Clasen
21a1a40555 Merge branch 'shadow-reduction' into 'master'
gsk: Don't overshadow

See merge request GNOME/gtk!3419
2021-04-12 02:39:55 +00:00
Matthias Clasen
849692b24b ngl: Fix unevenly scaled shadows
Ensure that we don't cut them off at the edges.
2021-04-11 22:35:02 -04:00
Matthias Clasen
f3bf4e4876 ngl: Don't slice unsliceable shadows
When the corners are too big to make slicing work,
don't do it, since it leads to broken results.
2021-04-11 22:10:33 -04:00
Matthias Clasen
46270d3dcd ngl: Fix a case of flipped shadow
In the non-sliced case, we were rendering the shadow
upside down.
2021-04-11 22:10:33 -04:00
Matthias Clasen
da6096faaf ngl: Add code to dump shadows
This can be helpful in understanding shadow bugs.
2021-04-11 21:13:47 -04:00
Matthias Clasen
2a7b5a5156 Merge branch 'matthiasc/for-master' into 'master'
menubutton: Propagate focus-on-click

See merge request GNOME/gtk!3424
2021-04-11 22:41:26 +00:00
Matthias Clasen
233e662294 togglebutton: Fix expected group behavior
The expectation is that a grouped button stays
active when you click it. Grouped check buttons
behave this way, and grouped toggle buttons should
too.
2021-04-11 18:29:53 -04:00
Matthias Clasen
ae41697d83 node-editor: Make header buttons not steal focus
This is rarely useful, and is confusing when it
happens as side-effect of dragging the window.
2021-04-11 15:32:15 -04:00
Matthias Clasen
e2fb59798e icon browser: Make header buttons not steal focus
This is rarely useful, and is confusing when it
happens as side-effect of dragging the window.
2021-04-11 15:32:15 -04:00
Matthias Clasen
d0fc3e166d widget-factory: Make header buttons not steal focus
This is rarely useful, and is confusing when it
happens as side-effect of dragging the window.
2021-04-11 15:32:15 -04:00
Matthias Clasen
e4ce46e75f gtk-demo: Make header buttons not steal focus
This is rarely useful, and is confusing when it
happens as side-effect of dragging the window.
2021-04-11 15:32:15 -04:00
Matthias Clasen
e2420f62fe menubutton: Propagate focus-on-click
Propagate the focus-on-click setting to the button
inside, so that setting menubuttons as !focus-on-click
works as expected. This helps for menubuttons in
header bars, where dragging on the button will otherwise
steal focus from the content.
2021-04-11 15:32:15 -04:00
Yuri Chornoivan
6712106c25 Update Ukrainian translation 2021-04-11 18:39:40 +00:00
Matthias Clasen
5b55138729 Merge branch 'matthiasc/for-master' into 'master'
some small optimizations

See merge request GNOME/gtk!3423
2021-04-11 18:23:54 +00:00
Matthias Clasen
1d9c581f10 ngl: Allow passing bounds to update_clip
update_clip only uses the bounds of the node that
we are currently passing. This opens the door to
updating the clip while handling a single node.
2021-04-11 12:54:17 -04:00
Matthias Clasen
6bfb57db16 ngl: Small optimization for shadows
When 9-slicing shadows, omit the center tile when it is
entirely contained in the outline (that is not always
the case, depending on corners and offsets).
2021-04-11 12:54:07 -04:00
Matthias Clasen
f8f2f2944f roundedrect: Speed up contains_rect and friends
gsk_rounded_rect_contains_rect was calling
gsk_rounded_rect_contains_point, which potentially
checks all four corners, for a total of up to 16
corner/point checks. But there is no need to do
more than 4 such checks to answer the question.
2021-04-11 12:52:30 -04:00
Matthias Clasen
aaf17fd3d0 ngl: Small optimization
We really want equality here.
2021-04-11 12:50:50 -04:00
Matthias Clasen
678e6fc6d6 nodeeditor: Make the help window wide enough
Make the help window wide enough to show the
tables without wrapping.
2021-04-11 12:50:34 -04:00
Matthias Clasen
fcf39170e1 Merge branch 'media-memory-leak' into 'master'
media: Fix a memory leak

See merge request GNOME/gtk!3420
2021-04-10 13:42:41 +00:00
Matthias Clasen
187072c3fa media: Fix a memory leak
This was introduced in e7dc82fa32.
2021-04-10 09:02:59 -04:00
Matthias Clasen
e6599c6c4f gsk: Don't overshadow
Reduce the cairo shadows to the same size as their GL brethren.
2021-04-09 21:47:55 -04:00
Matthias Clasen
87a8ff90d6 Merge branch 'popover-list-lockup' into 'master'
window: Defer focus setting until after paint

Closes #3725

See merge request GNOME/gtk!3417
2021-04-10 00:34:24 +00:00
Matthias Clasen
4a76abffd4 window: Defer focus setting until after paint
Commit 3dbf5038fa tried to defer focus changes
until after rendering is done. But it failed to do so, since
the toplevel ::render handler is still before rendering of
popups that are attached to that toplevel. To do this
properly, we need to do it in the AFTER_PAINT frame clock
phase.

Fixes: #3725
2021-04-09 19:44:10 -04:00
Matthias Clasen
715449695c Merge branch 'ngl-coloring-underlines' into 'master'
Optimize underlines in text

See merge request GNOME/gtk!3414
2021-04-09 15:36:21 +00:00
Matthias Clasen
d15b0afca9 Merge branch 'no-scroll-cursor' into 'master'
scrolledwindow: Stop using scroll cursors

See merge request GNOME/gtk!3416
2021-04-09 13:30:36 +00:00
Matthias Clasen
0d6bbc035d Merge branch 'ebassi/ci-docs' into 'master'
ci: Drop the split Fedora images

See merge request GNOME/gtk!3415
2021-04-09 12:35:49 +00:00
Matthias Clasen
9313d4b6b4 scrolledwindow: Stop using scroll cursors
We used to override cursor to use all-scroll while the
content is being scrolled. Unfortunately, there is several
problems with this:
- It is really only expected certain devices, and we don't
  have the device information on Wayland
- With the way cursor setting works in GTK4, non-NULL cursors
  of the content (eg the text views ibeam) win, making the
  scroll cursor not show up
- Under X11, we seem to miss scroll end events and then
  the scroll cursor gets stuck
Therefore, just remove this feature.
2021-04-09 08:26:09 -04:00
Emmanuele Bassi
ed412f43d1 ci: Drop the split Fedora images
Now that we don't need the whole of Pandoc to build our documentation,
we can go back to a single Fedora image for our CI.
2021-04-09 12:28:08 +01:00