Now that the use_es field is an int with a possible negative value, we
cannot use it its truth value directly; we need to check if it's a
positive value, instead.
GDK defaults to asking for an OpenGL 3.2 Core Profile, but if we get a
legacy profile from the underlying windowing system, the OpenGL version
will be fixed to 3.0. If that happens, we need to set the legacy bit on
the GdkGLContext, since that bit will be used to determine the version
and type of GLSL shaders that will be used by application and toolkit
code alike.
We've already set ->use_es correctly at context creation time, all this
can possibly do is change our mind about what kind of GL we're using.
Signed-off-by: Adam Jackson <ajax@redhat.com>
https://bugzilla.gnome.org/show_bug.cgi?id=773180
xdg_shell v6 allows grabless popups, whose behavior is not that
different from override redirect windows with no grab to take
keyboard input (and pointer events outside).
This means we can relax the requirement to have a grab before
creating an xdg_popup. The warning is still useful to have so
people stop relying on gdk_window_show();gdk_device_grab() being
an ok pattern to popup a window, it's been moved to wayland
implementation of gdk_device_grab() instead, so we warn if trying
to grab a GDK_WINDOW_TEMP window that's already visible.
https://bugzilla.gnome.org/show_bug.cgi?id=771694
This updates all the projects files to be be named appropriately as we move from GTK-3.x to 4.x,
and updates the autotools files so that things are distributed and generated properly.
Also remove deprecated/gtkstatusicon-quartz.c from gtk/Makefile.am, as that was causing 'make dist'
to fail as that file has been removed.
This fixes 'make dist' with the updated existing project files in proper order.
Note that this does not include the new GSK, which will be added later, so the project files do
not yet build the whole stack on Visual Studio at this point.
The surface-to-GL upload logic has become more complicated with the
addition of the GLES code paths; it's more logical to have a public
utility function that can be called from GDK users, instead of copy
pasting the whole thing multiple times.
This is an attempt to get rid of gdk_window_new() for more specific use
cases. These 2 are for client-side windows - regular ones and input-only
ones resepectively.
So far all those functions just call into gdk_window_new().
Just like GLib, GTK+ would benefit from getting warnings and errors from
the compilers.
We check various, common warnings, especially for a future use of C99;
additionally, we promote some warnings to errors, in order to ensure
that simple mistakes are caught during the development phase, before
they are submitted to the code repository.
The update tracking code was ugly and using deprecated drawing APIs. It
was also in the wrong place.
So instead of trying to keep it working, I'll remove it. We need to find
a better way to put it and make it work there.
And with it, gtk_widget_get_visual() and gtk_widget_set_visual() are
gone.
We now always use the RGBA visual (if available) and otherwise fall back
to the system visual.
The cursor was set using gdk_window_set_cursor() even in
gdk_window_new().
So instead of having yet another flag, just make the users of that flag
call gdk_window_set_cursor() directly after the window was created.
X11 was the only backend to support it and people can just override it
using XSetClassHint() directly.
The docs already advertised the function as "Do not use".
Keep the existing call to XSetClassHint() in place, so that we keep
setting the same values as in GTK3.
... and gdk_screen_get_window_stack().
Those functions were originally added in
5afb4f0f11 but do not seem to be used as
they are not implemented anywhere but in X.
As GDK is not meant to fulfill window management functionality I'm going
to remove these functions without replacements.
... and gdk_screen_get_width_mm() and gdk_screen_get_height_mm() and
the shortcut counterparts that call these functions on the default
screen.
Modern display servers don't provide an ability to query the size of a
screen or display so we shouldn't allow that either.
Nobody ever does a NULL check there so all that causes is crashes. So
we better return a non-primary monitor than NULL.
Fixes gdk-wayland always returning NULL.
ClutterEmbed on Wayland uses a subsurface and relocates it on configure
events, but when placed within a scrolled window, no configure event is
emitted and the ClutterEmbed subsurface remains static.
Emit a configure event for native windows in GdkWindow's internal
move_native_children() so that custom widgets relying on configure
events such as ClutterEmbed can relocate their stuff.
Similarly, when switching to/from normal/maximized/fullscreen states
which change the shadows' size and possibly shows/hides a header bar,
we need to emit a configure event even if the abs_x/abs_y haven't
changed to make sure the subsurface is size appropriately.
https://bugzilla.gnome.org/show_bug.cgi?id=771320https://bugzilla.gnome.org/show_bug.cgi?id=767713