Instead of scattering them around, define _WIN32_WINNT, WINVER and
NTDDIVER in gtk/meson.build, like what we do in GDK-Win32.
Also, since we are requiring Windows 7 or later in GDK-Win32, do
likewise in GTK, since GDK nowadays is in the same DLL/library as GTK,
so we should make things more uniform.
AeroSnap essentially resizes the surface by all means, so if a surface
is not resizable, just bail out of the operation, even though it is
triggered by a move operation.
This matches what is done in Windows.
There were several places where unnecessarily big minimum sizes
were hardcoded. Instead, set a reasonable default size for the
dialog and the let window shrink further.
Helps for mobile situations.
Related: #7133
To limit the amount of files installed by meson install, users can
specify specific classes of files they actually want to install.
Most to be installed files are automatically tagged by meson correctly
based on what function produced them, but it can't for some (esp. those
installed using install_data/subdir).
As gschema files *should typically* be available at runtime, give them
the "runtime" tag.
See https://mesonbuild.com/Installing.html#installation-tags
Existing code assumes displays are new connections and calls
gdk_display_close() on the display when done with whatever it was
doing.
If we return an existing display, that display gets closed...
It's also what the other backends do, including MacOS.
Fixes gsk/misc test.
With the switch to using the glib main context in the clipboard thread,
the clipboard hwnd is no longer used for sending messages.
This means it's not necessary to know it in the main thread.
And that means there's no small window where the clipboard thread spins
up and the window doesn't exist and any copy operation fails.
The main context can be created before spinning up the thread so
that is avoided.
Fixes the gtk/textbuffer test in the testsuite.
Instead of sending windows messages, use the main loop.
This is closer to the expectations of GTK developers and has better
thread safety handling as no HWND is needed as a messaging queue token.
Lots of newer apps that use their appid as their icon name don't set
window icons, since they aren't used in GNOME. Instead of setting it
manually in every app, just default to it.
Only set the icon if it exists in the icon theme.
Remove manually set default icons in the demo.
No tests as GtkApplication doesn't have any in the first place.
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/7120
This attempts to improve the somewhat "erratic" feeling of scrolling a
GtkTextView with fractional scaling. However, it also improves the
situation where you have a natural integer scaling factor such as 2x.
To do so, it quantizes the X/Y origin of the visible rect to something that
naturally alignes with device pixels. By doing so this aims to get
consistent pixel alignment when hinting so that you no longer see jumps
as the Y position of the buffer changes. X is also done for symmetry.
The buffer itself is left in integer coordinates to avoid any sort
of ABI breakage with existing applications. Only the origin x/y of the
drawing area is affected and thus should only affect the ABI of
gtk_text_view_get_visible_rect() by < 1 device pixel.
Applications which require precision in the visible rect origin may use
the new API introduced here as gtk_text_view_get_visible_offset(). This
provides the X,Y point as doubles. graphene_point_t was not used here
beacuse that appeared to cause aliasing due to float usage.
GNOME/GtkSourceView!375 provides an example of consuming this new API to
keep line numbers aligned in the same fashion as the textview contents.
a11y: When setting the selected state for list items, don't try to be smart and let the a11y layer handle deduplication.
Closes#6663
See merge request GNOME/gtk!7258
Commit b807b84e16 ("print dialog: Fix initial selection") made a
change where we connect to items-changed before the list item manager.
That leads to us attempting to set a selection for a tile that does
not yet exist.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/7109