Commit Graph

82334 Commits

Author SHA1 Message Date
Matthias Clasen
111230f5f9 bloatpad: Call gtk_init in main
We end up using a display via gtk_application_set_accels_for_action,
and that can't happen before gtk_init anymore.
2024-10-21 21:17:00 -04:00
Matthias Clasen
c09a51628b gtk4-demo: Call gtk_init in main
We end up using a display via gtk_application_set_accels_for_action,
and that can't happen before gtk_init anymore.
2024-10-21 21:17:00 -04:00
Matthias Clasen
96f8eb9c98 Merge branch 'wip/chergert/kinetic-frame-time' into 'main'
kineticscrolling: use computed frame times

See merge request GNOME/gtk!7842
2024-10-22 00:20:41 +00:00
Christian Hergert
c9facb5554 kineticscrolling: use computed frame times
Instead of accumulating a series of doubles, use the actual computed frame
time for duration tracking. While there is extremely low chance of
aliasing with animations under a few seconds, this just ensures we're
using the same clocking inside and outside of GtkKineticScrolling.
2024-10-21 16:15:26 -07:00
Matthias Clasen
a1d9b3e47d Merge branch 'display-init' into 'main'
gdk: No displays before init

See merge request GNOME/gtk!7836
2024-10-21 22:53:50 +00:00
Matthias Clasen
758e9787d4 Merge branch 'icon-lookup-none' into 'main'
icontheme: Add GTK_ICON_LOOKUP_NONE

See merge request GNOME/gtk!7852
2024-10-21 22:01:39 +00:00
Benjamin Otte
a84cbe22d1 Merge branch 'wip/otte/win32-fixes' into 'main'
win32: Various fixes

See merge request GNOME/gtk!7848
2024-10-21 21:39:30 +00:00
Matthias Clasen
d6f93a3213 docs: Beef up docs for gtk_init
Mention explictly that this opens the default display.
2024-10-21 17:24:53 -04:00
Maximiliano Sandoval
169795a374
icontheme: Add GTK_ICON_LOOKUP_NONE
From bindings it is not clear that one can pass `0` as a value.
2024-10-21 23:00:26 +02:00
Benjamin Otte
62b1ef9f72 CI: Enable -Werror in MSVC build 2024-10-21 20:18:46 +02:00
Benjamin Otte
e6cfc5e3cd CI: Add pcre2 to disabled werrors 2024-10-21 20:18:46 +02:00
Benjamin Otte
07a5f75fe4 gpu: Make definition match declaration 2024-10-21 20:18:46 +02:00
Matthias Clasen
1f20d0c9ed gdk: Spread the errors
Call gdk_ensure_initialized() directly in gdk_display_open_default(),
gdk_display_open(), gdk_x11_display_open() and gdk_display_get_default(),
so we get the right function name in the error message. These functions
are likely candidates that people might call without ensuring that GDK is
initialized.
2024-10-21 13:30:19 -04:00
Matthias Clasen
c239788a34 gdk: No displays before init
Don't allow to create displays before gdk has been initialized.

Note that this error triggers in nautilus 47.0, but we consider
what it is doing unsupported and broken.

Related: #7035
2024-10-21 13:30:19 -04:00
Matthias Clasen
51f3f6f8d1 print: Avoid calling gdk_display_get_default
Check if GTK has been initialized before trying to get a display
in a class_init function. The introspection property dumper code
will instantiate all types and run into the new introduced errors
if we try to get a display in class_init.
2024-10-21 13:30:19 -04:00
Matthias Clasen
84779ccdbc tests: Cosmetics
Our test setups aready enforce GSETTINGS_BACKEND=memory, don't set
it again in code.
2024-10-21 13:30:19 -04:00
Matthias Clasen
acd00ceb4d tests: Fix the displaymanager tests
Don't open a display without gtk_init().
2024-10-21 13:30:19 -04:00
Daniel Șerbănescu
015665ca9f Update Romanian translation
(cherry picked from commit b0b1d7a928)
2024-10-21 16:55:57 +00:00
Matthias Clasen
66367bf5d9 tests: Fix the textbuffer tests
Don't needlessly open a display before gtk_init.
2024-10-21 12:32:25 -04:00
Matthias Clasen
31683469c1 Merge branch 'for-main' into 'main'
Misc cleanups

See merge request GNOME/gtk!7832
2024-10-21 16:06:02 +00:00
Matthias Clasen
b9a382878d build: Rename meson_options.txt to meson.options
This is the preferred name since meson 1.1, and we require 1.2 now.
2024-10-21 11:39:04 -04:00
Matthias Clasen
9dd51aa985 docs: Typo fix 2024-10-21 11:39:04 -04:00
Matthias Clasen
24c1afac49 docs: Update tests
Remote the gdk docs check from the failing testsuite, since they pass.
Add a (failing) docs check for the gdk-x11 docs.
2024-10-21 11:39:04 -04:00
Matthias Clasen
ce92ce6d36 gdk: Add missing color state docs
Document the getters for oklab/okch.
2024-10-21 11:39:04 -04:00
Matthias Clasen
5366f83711 demos: Beef up about dialogs 2024-10-21 11:39:04 -04:00
Matthias Clasen
3ffc194e9c demos: Drop the icon-browser fully
This was forgotten in 32d03a548e.
2024-10-21 11:39:04 -04:00
Matthias Clasen
0170f8e261 Drop expandtab from vim modelines
This is already covered by our editorconfig.
2024-10-21 11:39:04 -04:00
Matthias Clasen
7de9e47cfc build: Cosmetics
Reuse a variable.
2024-10-21 11:39:04 -04:00
Matthias Clasen
655736b05f gdk: Bling up debug spew slightly
We use ✓ and ✗ in some other places already, be consistent.
2024-10-21 11:39:04 -04:00
Matthias Clasen
aa268b31f2 vulkan: Cosmetics
Rename gsk_vulkan_feature_keys to gdk_vulkan_feature_keys, since
these keys live in gdk.
2024-10-21 11:38:34 -04:00
Matthias Clasen
0b9685fb41 Merge branch 'wip/smcv/issue7093' into 'main'
vulkan: Only log the list of extensions if debugging is enabled

Closes #7093

See merge request GNOME/gtk!7847
2024-10-21 15:26:08 +00:00
Matthias Clasen
d26f323bfe Merge branch 'semicolon' into 'main'
Remove a couple of stray semicolons

See merge request GNOME/gtk!7839
2024-10-21 15:05:10 +00:00
Matthias Clasen
51908dd8d7 Merge branch 'amolenaar/macos-fix-dnd-crash' into 'main'
macos: fix crashes when dragging libadwaita TabView tabs

Closes #7097

See merge request GNOME/gtk!7849
2024-10-21 15:02:31 +00:00
Benjamin Otte
7aa8afa9d7 build: Disable MSVC warnings
Those 2 warnings happen with legitimate usage, so we don't want
to see them.
In particular not when using "-Werror" (or the MSVC equivalent "/WX")
2024-10-21 08:59:24 +02:00
Benjamin Otte
a68f1d6155 testsuite: Fix MSVC warnings
ints/longs have a different size to pointers on Windows 64bit.
And casts from int to pointer of diferent size cause a warning.
2024-10-21 07:35:42 +02:00
Benjamin Otte
a74457697e build: Fix MSVC warning due to Pango bug
Pango unconditionally defines STRICT, which we use, see
https://learn.microsoft.com/en-us/windows/win32/winprog/enabling-strict

And that causes a duplicate definition, so we undefined it before
including the offending Pango header.

See also https://gitlab.gnome.org/GNOME/pango/-/merge_requests/749
2024-10-21 07:35:42 +02:00
Benjamin Otte
9a59fce106 treerbtree: Fix MSVC compiler warnings the simplest way
It's deprecated code after all.
2024-10-21 07:35:42 +02:00
Benjamin Otte
ea3aad2848 inspector: Don't shadow connect(2) 2024-10-21 07:35:42 +02:00
Benjamin Otte
4f3ebb9e9f shortcutssection: Fix MSVC warning
... and simplify what's actually going on.

  ABS (n_rows - n) < ABS ((n_rows - height) - (n + height))
Those values are all unsigned, so this is equivalent to
  n_rows - n < (n_rows - height) - (n + height)
The math on the right is confusing but can be rearranged:
  n_rows - n < n_rows - n - 2 * height
With x = n_rows - n, this simplifies to:
  x < x - 2 * height
Which is only true if it underflows, ie if
  x < 2 * height
Resubstituting the old values gives:
  n_rows - n < 2 * height
Which is the value I used.
2024-10-21 07:35:42 +02:00
Benjamin Otte
5a6ea4ac86 timsort: add ELEM_REV()
for reverse-element lookup.

Because our indices are always unsigned, we need to take special care
to not trigger compiler warnings when doing negative array indexing.

And yes, for now "0 - x" is good enough.
2024-10-21 07:35:42 +02:00
Benjamin Otte
516506e1ad inspector: Rename enum
SEVERITY_ERROR is part of Windows COM error handling, see
https://learn.microsoft.com/en-us/windows/win32/com/structure-of-com-error-codes
2024-10-21 07:35:42 +02:00
Benjamin Otte
faae6f4c19 tests: Fix file to be Unicode 2024-10-21 07:35:42 +02:00
Benjamin Otte
4fcdcc2e50 textview: Don't overflow
Both numbers are unsigned, so the result is always unsigned.
(Which also means ABS() doing a < 0 check doesn't work.)
And that in particular means that end - begin overflows to a very
large number when begin > end.
2024-10-21 07:35:42 +02:00
Benjamin Otte
5637b3ba20 gpu: Avoid duplicated name with Windows API
CacheData is an enum value, see
https://learn.microsoft.com/en-us/windows/win32/api/winnt/ne-winnt-processor_cache_type
2024-10-21 07:35:42 +02:00
Benjamin Otte
225acbb12b build: Fix MSVC warning about casting
enums and uints might have a different size, so
pointers to enums and poiters to uints don't match.
2024-10-21 07:35:42 +02:00
Benjamin Otte
9e38c628f2 roundedbox: Fix shadowed name of Windows API
Arc() is a GDI function that draws an arc:
https://learn.microsoft.com/en-us/windows/win32/api/wingdi/nf-wingdi-arc
2024-10-21 07:35:42 +02:00
Benjamin Otte
19e1eee05a treeview: Fix MSVC warning
This code was unnecessary.
2024-10-21 07:35:42 +02:00
Benjamin Otte
67a34ac1d2 build: Fix MSVC warning about type mismatch
G_STRUCT_OFFSET() returns a long.
long is a 32bit type on 64bit Windows.
Casting int to pointer of different size causes a warning.
2024-10-21 07:35:42 +02:00
Benjamin Otte
be08be2fa9 renderer: Remove unneeded headers 2024-10-21 07:35:42 +02:00
Benjamin Otte
2646785e4c build: Fix MSVC warning about non-matching types 2024-10-21 07:35:41 +02:00