Ping/pong serials are not meant to be interpreted as user input serials
(e.g. those given back later to the compositor on grabs). As a matter
of fact, Mutter uses a different count (i.e. timestamps) in these, so
using these serials may confuse the compositor into denying certain
operations like DnD.
In macOS-12.sdk CGContextConverSizeToDeviceSpace returns a negative
height and passing that to CGContextScaleCTM in turn causes the cairo
surface to draw outside the window where it can't be seen. Passing the
absolute values of the scale factors fixes the display on macOS 12 without
affecting earlier macOS versions.
Broadway is the only GTK+ backend that throws an error on stderr for a
"display server" connection failure.
This causes problems when gtk_init_check() is used and unexpected error
output is generated such as with hotdoc, which fails when generating a
GTK plugin's documentation instead of overlooking the issue.
"Unable to init server: Could not connect: Connection refused"
MinGW-w64 CRT provides no 'hid.lib' file. Instead, it has 'libhid.a'
which can be linked with '-lhid' linker argument.
Also, we have to declare the '_LIBADD' variable and add 'LDADDS' to it,
or 'LDADDS' won't do anything for the build.
Note that gdk_monitor_get_geometry () returns DPI-scaled values,
while the screen offset should be unscaled, as scales are properties
of indivdual monitors.
An arithmetic operation involving a signed and an unsigned operand
of the same rank will have both operands converted to *unsigned*.
That's an issue if the signed operand actually has a negative value.
That was causing issues with the handling of monitor geometries that
had negative x / y positions.
Commit 68188fc948 introduces a workaround for clients that try to
change the size of a popup after it is created, but inadvertently
introduces an infinite loop of surface creation when the popup enters
two or more wl_outputs with different scales on creation.
This commit checks if the size actually changed before applying the
workaround and avoids the loop.
Gdk doesn't know the scale of output globals it didn't bind. This
keeps them from entering the output list and triggering erroneous
changes in surface scales.
gdkinternal-quartz.h isn't installed but the headers that included
it are, which which would cause the build to fail if an external
project included one of them.
Also changed the includes in gdkinteral-quartz.h to local for
faster loading.
...if GLES (libANGLE) support was enabled in the build. This way, we can
check whether the GL driver is capable enough to support the OpenGL
features that we use in GTK. If the driver is not capable enough, and
GLES support is enabled, we can try to create the GdkGLContext again as a
GLES context.
Group the WGL-specific code and GLES-specific code together, so that we
can reduce the number of #ifdef ... in the code, to make the code more
readable and easily maintained. This will pave the way to add a
fallback mode to use libANGLE (OpenGL/ES) in case the Desktop OpenGL
support is inadequte, if OpenGL/ES support is enabled in the build.
This is somewhat based on the updates that were done in GTK master, so
we are using one subclass for WGL-based GdkGLContexts, and another for
GLES-based GdkGLContexts.
Also remove the underscores in many of the functions in
gdkglcontext-win32.*.
Clean up the code a bit as a result.
When a popup is remapped, if the GdkWindow::x/y position is negative,
some best-effort hueristics used to ignore internal X11-style hackery
windows incorrectly scooped up remapped popup windows.
Avoid these hueristics by resetting the x and y fields of GdkWindow to 0
whe hiding a popup. It'll then appear as if it was newly initialized,
and escape the mentioned hueristics.
Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/4071
Like the recent updates in GTK4, the HWND that we use to obtain the HDC
that we need for OpenGL/GLES operations should really be tied to
GdkWindow, not GdkDisplay, as that is where the Win32 HWND where we
originate from is located, so stop storing the GL HWND in
GdkWin32Display, but just grab them from the GdkWindow that is bound to
the GdkGLContext.
We are more conservative about freeing up GL resources in GTK3, so we
will continue to call ReleaseDC() as we did before.
It apparently worked by chance in the past, but now causes e.g.
alphanumeric characters to be interpreted as half-width katakana
when using the Japanese IME.
Width and height of a GdkMonitor are derived via wl_output which
talks about physical dimensions of a device and compositors usually
implement this as the untransformed values (e.g. weston, wlroots).
Since the GTK client has no way to figure out if a monitor was rotated,
transform the physical dimensions according to the applied wayland
transform to have the physical dimensions match the logical ones.
Mutter flips the physical dimensions itself but doesn't announce the
transform so this shouldn't break anything there.
New release function _gdk_quartz_drag_source_context_destroy_gtk_only
gets called when drag fails to start or is cancelled as well as
when it successfully completes.
Some GL drivers such as Mesa-D3D12 do not allow one to call SetPixelFormat() on
a given HDC if one pixel format has been already set for it, so first check the
HDC with GetPixelFormat() to see whether a pixel format has already been set
with the HDC, and only attempt to acquire the pixel format if one has not been
set.
This will fix running with GL on Windows using the Mesa drivers.