To support Sierra, we need to have access to pasteboard types as a
NSString. Constants are provided in later versions of macOS, but we
can emulate that with an array which is initialized on first access.
On older systems, the availability of some methods seem to be incorrect
based on Apple documentation. This works around the issue by using
the rect conversion on older systems.
On x11 toplevel layout is not created before toplevel
is presented, but GTK tries to update it on idle
which leads to a crash due to accessing property
of undefined object. Treat soon to be created layout
as a layout with default values upon creation (resizable).
These functions were not implemented when the sizing changes
landed before GTK 4 was released. This fixes an issue with non-
resizeable windows not reacting to layout changes.
Fixes#3532
According to OpenGL spec, a shader object will only be flagged
for deletion unless it has been detached; when a program object
is deleted, those shader objects attached to it will be detached
but not deleted unless they have already been flagged for deletion.
So we shall detach a shader object before it is deleted, and delete
it before the program object is deleted best.
Some GTK based applications such as Qemu UI create and manage
EGLSurfaces associated with the relevant GdkSurfaces. In order to create
an EGLSurface, there needs to be a way to pass the native window
object to eglCreateWindowSurface(). While running in an X environment,
the native window object can be obtained by calling
gdk_x11_surface_get_xid(). Likewise, the native window object can be
obtained by calling gdk_wayland_surface_get_wl_egl_window() while
running in a Wayland environment. Therefore, this API needs to be
exposed to apps.
Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
If set to TRUE, does not call the free func for the removed items.
This can be used to move items between arrays without having to do the
refcounting dance.
../gdk/gdktoplevellayout.c:217: Warning: Gdk: gdk_toplevel_layout_get_maximized:
unknown parameter 'maximized' in documentation comment, should be 'maximize'
100% symbol docs coverage.
833 symbols documented.
0 symbols incomplete.
0 not documented.
What's left are just type system macros and windowing system opaque
structures.
Depending on the input driver, we will get XI_Motion based scroll
events for regular mouse wheels. These are intended to be handled
as discrete scroll, so detect smooth scroll events that move by
exactly 1.0 in either direction.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3459
When being fullscreen, and wanting to unfullscreen but not caring about
whether to go unmaximized or maximized (as this information is lost), if
the GdkToplevelLayout represents the full intended state, we won't be
able to do the right thing.
To avoid this issue, make the GdkToplevelLayout API intend based, where
if one e.g. doesn't call gdk_toplevel_set_maximized() with anything, the
backend will not attempt to change the maximized state.
This means we can also remove the old 'initially_maximized' and
'initially_fullscreen' fields from the private GtkWindow struct, as we
only deal with intents now.
This is a more reliable calling point than ::resume-events, and a
good one to schedule things so they happen on a frame clock in no
special phase (Thus still fixing the original issue at 80d4a08e30)
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3461