Simon McVittie [Mon, 16 Aug 2021 08:12:34 +0000 (09:12 +0100)]
Disable GStreamer for the udeb build
Support for VP8 and VP9 is officially part of the GTK4 API, but it seems
OK to provide a reduced API in debian-installer.
Simon McVittie [Sun, 15 Aug 2021 15:44:02 +0000 (16:44 +0100)]
d/rules: Rebuild emoji data from source files
This provides a straightforward way to check that we have the correct
source files.
Simon McVittie [Sun, 15 Aug 2021 15:38:22 +0000 (16:38 +0100)]
Unfuzz patches
Gbp-dch: ignore
Simon McVittie [Sun, 15 Aug 2021 15:38:00 +0000 (16:38 +0100)]
Drop patches that were applied upstream
Simon McVittie [Sun, 15 Aug 2021 15:20:31 +0000 (16:20 +0100)]
d/control.in: Remove build-dependencies for Google Cloud Print
The service underlying this printing backend was shut down at the end
of 2020, so the printing backend is no longer useful and was removed
upstream.
Simon McVittie [Sun, 15 Aug 2021 15:18:16 +0000 (16:18 +0100)]
d/control.in: Bump meson requirement as per meson.build
Simon McVittie [Sun, 15 Aug 2021 14:59:10 +0000 (15:59 +0100)]
New upstream release
Simon McVittie [Sun, 15 Aug 2021 14:59:10 +0000 (15:59 +0100)]
Update upstream source from tag 'upstream/4.3.2+ds1'
Update to upstream version '4.3.2+ds1'
with Debian dir
70767fb7facb78842dc655ef16160e42aa35552e
Simon McVittie [Sun, 15 Aug 2021 14:58:31 +0000 (15:58 +0100)]
New upstream version 4.3.2+ds1
Simon McVittie [Sun, 15 Aug 2021 14:57:17 +0000 (15:57 +0100)]
d/watch, d/copyright: Exclude pregenerated documentation
There's a lot of it, and excluding it makes the diff to review a lot
smaller.
Simon McVittie [Sun, 15 Aug 2021 14:50:37 +0000 (15:50 +0100)]
New upstream release
Simon McVittie [Sun, 15 Aug 2021 14:50:35 +0000 (15:50 +0100)]
Update upstream source from tag 'upstream/4.3.2+ds'
Update to upstream version '4.3.2+ds'
with Debian dir
3ad6d9ebb6f519ff23521f2f91823d95ae790c74
Simon McVittie [Sun, 15 Aug 2021 14:49:43 +0000 (15:49 +0100)]
New upstream version 4.3.2+ds
Iain Lane [Mon, 26 Jul 2021 11:56:58 +0000 (12:56 +0100)]
Finalise changelog
Iain Lane [Mon, 26 Jul 2021 10:58:11 +0000 (11:58 +0100)]
control: Refresh
Gbp-Dch: Ignore
Iain Lane [Mon, 26 Jul 2021 10:52:13 +0000 (11:52 +0100)]
Update changelog
Iain Lane [Mon, 26 Jul 2021 10:45:56 +0000 (11:45 +0100)]
copyright: Fix dep5-copyright-license-name-not-unique
CC0-1.0 was defined twice
Iain Lane [Mon, 26 Jul 2021 10:30:57 +0000 (11:30 +0100)]
rules: Only skip the cloud providers on Ubuntu itself
For everything else the main/universe distinction doesn't apply
Matthias Clasen [Fri, 23 Jul 2021 21:14:24 +0000 (17:14 -0400)]
4.3.2
Matthias Clasen [Sun, 25 Jul 2021 02:03:46 +0000 (02:03 +0000)]
Merge branch 'misc-speedups' into 'master'
ngl: Speed up clipping calculations a bit
See merge request GNOME/gtk!3784
Matthias Clasen [Sat, 24 Jul 2021 22:44:33 +0000 (18:44 -0400)]
sizerequest: Simplify some code
Avoid some repeated MAX().
Matthias Clasen [Sat, 24 Jul 2021 22:41:09 +0000 (18:41 -0400)]
sizerequest: Keep branches in sync
There are some unintentional differences between
the path that uses a layout manager, and the path
that uses widget vfuncs. Sync them up.
Matthias Clasen [Fri, 23 Jul 2021 14:18:44 +0000 (10:18 -0400)]
widget: Avoid some unnecessary back-and-forth casting
Avoid some unnecessary casting and a redundant early exit.
Matthias Clasen [Fri, 23 Jul 2021 00:59:01 +0000 (20:59 -0400)]
widget: Avoid GObject data for action muxer
Most widget have an action muxer now, so just
store it in GtkWidgetPrivate.
Matthias Clasen [Fri, 23 Jul 2021 00:58:25 +0000 (20:58 -0400)]
layoutmanager: Avoid some overhead
Use inline getters for some things.
Matthias Clasen [Fri, 23 Jul 2021 00:53:49 +0000 (20:53 -0400)]
gridlayout: Avoid some unnecessary overhead
Use inline functions for some things.
Matthias Clasen [Sat, 24 Jul 2021 14:51:08 +0000 (10:51 -0400)]
gsk: Optimize gsk_transform_to...
Optimize these functions for the common cases.
Matthias Clasen [Sat, 24 Jul 2021 14:48:20 +0000 (10:48 -0400)]
gsk: Add a shortcut for a common transform case
Add a private getter for the translation part of a
transform node, to avoid pulling it out of the transform
over and over.
Matthias Clasen [Sat, 24 Jul 2021 13:49:09 +0000 (09:49 -0400)]
gsk: Add a private getter for container children
No need to get them one-by-one, in our inner loop.
Matthias Clasen [Sat, 24 Jul 2021 13:50:43 +0000 (09:50 -0400)]
ngl: Reduce type checking overhead
No need to be very careful here, these are entirely
internal types.
Matthias Clasen [Fri, 23 Jul 2021 14:19:16 +0000 (10:19 -0400)]
ngl: Speed up clipping calculations a bit
Exit as early as possible from intersect_rounded_rectilinear.
Piotr Drąg [Sat, 24 Jul 2021 12:38:51 +0000 (14:38 +0200)]
Update POTFILES.in
Emmanuele Bassi [Sat, 24 Jul 2021 11:45:00 +0000 (11:45 +0000)]
Merge branch 'no-pposition' into 'master'
gdk/x11: Do not set PPosition hint
See merge request GNOME/gtk!3781
Florian Müllner [Sat, 24 Jul 2021 04:32:16 +0000 (06:32 +0200)]
gdk/x11: Do not set PPosition hint
It is good practice for (floating) window managers to respect explicit
position hints from clients (as long as the window wouldn't end up
off-screen etc.).
Before commit
13d3afa56e9, GTK had a flag for setting the PPosition hint,
but now does so unconditionally. However the real intention is to *not*
request a fixed position, so don't do that.
Matthias Clasen [Fri, 23 Jul 2021 20:29:07 +0000 (20:29 +0000)]
Merge branch 'wip/exalm/gtktext-selection-fix' into 'master'
text: Use the widget y coordinate for gestures
See merge request GNOME/gtk!3780
Alexander Mikhaylenko [Fri, 23 Jul 2021 09:15:43 +0000 (14:15 +0500)]
text: Use the widget y coordinate for gestures
Currently we use layout coordinates and widget height when determining
where a click or drag has happened. If the widget has top padding (which it
does inside a GtkEntry, for example), the area where it's possible to select
text is shifted down, so the part of GtkText above the layout is not counted
as the draggable area and instead the equal area below the widget is counted.
Since GtkText is always single-line, there's no need to do any of that and
we can use widget coordinates. Then the draggable area matches the widget
and the problems goes away.
Matthias Clasen [Fri, 23 Jul 2021 14:25:29 +0000 (14:25 +0000)]
Merge branch 'stack-page-name' into 'master'
stack: GtkStackPage:name is not construct-only
Closes #4109
See merge request GNOME/gtk!3778
Matthias Clasen [Thu, 22 Jul 2021 21:22:55 +0000 (21:22 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Cosmetics
See merge request GNOME/gtk!3779
Matthias Clasen [Thu, 22 Jul 2021 21:02:21 +0000 (17:02 -0400)]
Cosmetics
Fix a comment typo.
Matthias Clasen [Thu, 22 Jul 2021 20:55:15 +0000 (16:55 -0400)]
stack: GtkStackPage:name is not construct-only
We have a setter for this property, so we clearly
weren't serious when we marked it as construct-only.
Fixes: #4109
Matthias Clasen [Thu, 22 Jul 2021 19:20:22 +0000 (19:20 +0000)]
Merge branch 'startup-profiling' into 'master'
Add more sysprof marks
See merge request GNOME/gtk!3777
Matthias Clasen [Thu, 22 Jul 2021 15:36:29 +0000 (11:36 -0400)]
Add more sysprof marks
Add a few more marks during gtk_init to figure out where
our startup time goes, and avoid the sysprof initialization
from distorting the first mark.
Matthias Clasen [Thu, 22 Jul 2021 17:04:27 +0000 (17:04 +0000)]
Merge branch 'startup-profiling' into 'master'
Add more sysprof marks
See merge request GNOME/gtk!3776
Matthias Clasen [Thu, 22 Jul 2021 15:36:29 +0000 (11:36 -0400)]
Add more sysprof marks
Add a few more marks during gtk_init to figure out where
our startup time goes, and avoid the sysprof initialization
from distorting the first mark.
Benjamin Otte [Thu, 22 Jul 2021 14:51:05 +0000 (14:51 +0000)]
Merge branch 'wip/otte/gleanup' into 'master'
reorganize GDK's GL code
See merge request GNOME/gtk!3726
Benjamin Otte [Thu, 22 Jul 2021 14:23:06 +0000 (16:23 +0200)]
glx: Get rid fo DrawableInfo
Store the frame counter in the surface, where it belongs.
Chun-wei Fan [Mon, 19 Jul 2021 09:13:53 +0000 (17:13 +0800)]
gdkdisplay-win32.c: Don't call ReleaseDC() unnecessarily
The dummy Win32 window that we use to capture display change events and
to create dummy WGL contexts was created with CS_OWNDC, so we really do
not need to (and should not) call ReleaseDC() on the HDC that we
obtained from it, so drop these calls.
Chun-wei Fan [Mon, 19 Jul 2021 02:48:03 +0000 (10:48 +0800)]
GDK-Win32: init_gl(): Default to WGL for now
Since the shaders need to be updated for using with GLES (libANGLE at
least), default to WGL for now. Unfortunately it is not that common for
Windows to have GLES support, in which the easiest way to obtain such
support is via Google's libANGLE.
Chun-wei Fan [Mon, 19 Jul 2021 02:32:28 +0000 (10:32 +0800)]
GDK-Win32: Fixup, and cleanup WGL HDC handling
It turns out that the problem of the WGL window not drawing was due to
the fact that I messed up where I placed SwapBuffers() during the
conversion... doh:|
At the same time, stop storing the HDC in the GdkWin32GLContextWGL, but
instead always create it along the surface we created, so that it is ready
for use for operating with WGL when we are not dealing with "surfaceless"
contexts. If we are dealing with "surfaceless" contexts, just use the
HDC of the dummy window that we created when we created the
Gdk(Win32)Display.
WGL contexts should now be in working order at this point.
Chun-wei Fan [Wed, 14 Jul 2021 09:46:31 +0000 (17:46 +0800)]
Split out WGL/EGL stuff and simplify things
This commit attempts to split GdkWin32GLContext into two parts, one for
WGL and the other for EGL (ANGLE), and attempts to simplify things a
bit, by:
* We are already creating a Win32 window to capture display changes,
so we can just use that to act as our dummy window that we use to
find out the pixel format that the system supports for WGL. We also
use it to obtain the dummy legacy WGL context that we will always
require to create our more advanced Core WGL contexts.
* Like what is done in X11, store up the WGL pixel format or the
EGLConfig in our GdkWin32Display.
* Ensure we do not create the dummy WGL context unnecessarily.
In this way, we can successfully create the WGL/EGL contexts, however
there are some issues at this point:
* For WGL, the code successfully initializes and realizes the WGL
Contexts, but for some reason things became invisible. When running
gtk4-demo, this can be verified by seeing the mouse cursor changing
when moved to spots where one can resize the window, although they
were invisible.
* For EGL, the code initializes EGL but could not realize the EGL
context as shaders failed to compile. It seems like the shader issue
is definitely outside the scope of this MR.
Benjamin Otte [Sat, 10 Jul 2021 00:29:17 +0000 (02:29 +0200)]
gl: Fix issue with EGL + nvidia
nvidia sets the default draw buffer to GL_NONE if EGL contexts are
initially bound to EGL_NO_SURFACE which is exactly what we are doing. So
bind them to GL_BACK when drawing, as they should be.
See https://phabricator.services.mozilla.com/
D118743 for a discussion
about EGL_NO_CONTEXT and draw buffers.
Chun-wei Fan [Wed, 14 Jul 2021 04:28:07 +0000 (12:28 +0800)]
GDK: Add debug option for WGL usage
This way, one can force using WGL on Windows even if EGL support was
enabled. Also update the help text for gl-egl as it will apply for
Windows, albeit a bit later.
Chun-wei Fan [Wed, 14 Jul 2021 04:19:52 +0000 (12:19 +0800)]
GDK-Win32: Move some functions out of gdkglcontext-win32.c
We want these to be out of the way as we split between WGL and EGL/ANGLE
GL contexts, so that they don't get in the way.
Benjamin Otte [Tue, 13 Jul 2021 03:23:41 +0000 (05:23 +0200)]
display: Move GL selection code into gdkdisplay-x11.c
This has the benefit that we can refactor it and make sure we deal with
GdkDisplay::init_gl() not being called at all because
GDK_DEBUG=gl-disable had been specified.
Benjamin Otte [Tue, 13 Jul 2021 03:04:45 +0000 (05:04 +0200)]
x11: Move code from GdkGLContextX11
It's not used there, but both backends have independent
immplementationgs for it.
I want to get rid of GdkGLContextX11 and moving code from it is the
first step.
Benjamin Otte [Fri, 9 Jul 2021 01:28:34 +0000 (03:28 +0200)]
inspector: Add support for displaying GL errors
Also, no need to show a GL version if GL isn't available.
Benjamin Otte [Fri, 9 Jul 2021 00:50:32 +0000 (02:50 +0200)]
gdk: Move GL context construction to GdkGLContext
Now that we have the display's context to hook into, we can use it to
construct other GL contexts and don't need a GdkSurface vfunc anymore.
This has the added benefit that backends can have different GdkGLContext
classes on the display and get new GLContexts generated from them, so
we get multiple GL backend support per GDK backend for free.
I originally wanted to make this a vfunc on GdkGLContextClass, but
it turns out all the abckends would just call g_object_new() anyway.
Benjamin Otte [Wed, 7 Jul 2021 02:40:34 +0000 (04:40 +0200)]
gl: Move vfunc
Instead of
Display::make_gl_context_current()
we now have
GLContext::clear_current()
GLContext::make_current()
This fits better with the backends (we can actually implement
clearCurrent on macOS now) and makes it easier to implement different GL
backends for backends (like EGL/GLX on X11).
We also pass a surfaceless boolean to make_current() so the calling code
can decide if a surface needs to be bound or not, because the backends
were all doing whatever, which was very counterproductive.
Benjamin Otte [Wed, 7 Jul 2021 01:00:09 +0000 (03:00 +0200)]
gl: Require EGL_KHR_surfaceless_context with egl
The code to create and manage a fake egl surface to bind to is
complex and completely untested because everyone seems to support this
extension.
nvidia and Mesa do support it and according to Mesa devs, adding support
in a new driver is rather simple and Mesa drivers gain that feature
automatically, so all future drivers shoould have it.
Benjamin Otte [Tue, 6 Jul 2021 02:50:01 +0000 (04:50 +0200)]
gdk: Get rid of paint contexts
... or more exactly: Only use paint contexts with
gdk_cairo_draw_from_gl().
Instead of paint contexts being the only contexts who call swapBuffer(),
any context can be used for this, when it's used with
begin_frame()/end_frame().
This removes 2 features:
1. We no longer need a big sharing hierarchy. All contexts are now
shared with gdk_display_get_gl_context().
2. There is no longer a difference between attached and non-attached
contexts. All contexts work the same way.
Benjamin Otte [Tue, 6 Jul 2021 02:47:15 +0000 (04:47 +0200)]
gl: Store the context::in-frame state in the current context
Do not treat the context as already current when the value
of context::in-frame changes.
This is so we can bind to EGL_NO_SURFACE if context::in-frame == false
and to context::surface if context::in-frame == true.
This allows getting rid of the attached property in future commits.
Benjamin Otte [Sat, 10 Jul 2021 01:24:00 +0000 (03:24 +0200)]
gl: Deprecate gdk_gl_context_get_shared_context()
It's not used anymore. And in particular we do want to keep the display
context private, so we're not gonna return it from this function.
Benjamin Otte [Wed, 30 Jun 2021 02:52:35 +0000 (04:52 +0200)]
gdk: Add gdk_gl_context_is_shared()
... and use it in the GL renderers.
Benjamin Otte [Mon, 5 Jul 2021 02:24:43 +0000 (04:24 +0200)]
ngl: Store the shared driver in the display
... instead of some random GL context.
Benjamin Otte [Mon, 5 Jul 2021 01:04:08 +0000 (03:04 +0200)]
gdk: Require EGL version 1.4 across the board
Mesa currently ships 1.5.
Benjamin Otte [Sun, 4 Jul 2021 23:57:03 +0000 (01:57 +0200)]
gdk: Add GdkDisplay::init_gl vfunc
The vfunc is called to initialize GL and it returns a "base" context
that GDK then uses as the context all others are shared with. So the GL
context share tree now looks like:
+ context from init_gl
- context1
- context2
...
So this is a flat tree now, the complexity is gone.
The only caveat is that backends now need to create a GL context when
initializing GL so some refactoring was needed.
Two new functions have been added:
* gdk_display_prepare_gl()
This is public API and can be used to ensure that GL has been
initialized or if not, retrieve an error to display (or debug-print).
* gdk_display_get_gl_context()
This is a private function to retrieve the base context from
init_gl(). It replaces gdk_surface_get_shared_data_context().
Benjamin Otte [Sun, 4 Jul 2021 18:55:53 +0000 (20:55 +0200)]
wayland: Don't pass GL config to get_egl_surface()
There's only one GL config.
Benjamin Otte [Sun, 4 Jul 2021 17:48:11 +0000 (19:48 +0200)]
wayland: Move fbconfig into the display
Create it during init and then reuse it for all contexts.
While doing that, also improve error reporting - that's not used yet but
will in later commits.
Benjamin Otte [Sun, 4 Jul 2021 00:43:49 +0000 (02:43 +0200)]
gdk: Allow GdkDrawContext with a %NULL surface
This is not used yet, but it allows surfaceless GL contexts.
For that purpose, we need to make the display a construct-only property,
so that it can be set when the surface isn't.
This adds a bunch of very picky checks in the constructor so nothing bad
can happen.
Benjamin Otte [Sat, 3 Jul 2021 23:43:16 +0000 (01:43 +0200)]
gdk: Add a private struct to GdkDisplay
... and move some members from the GdkDisplay struct.
We've always wanted to add one to isolate the display from the backends
a bit more, but so far it's never happened.
Now that I'm about to add more data to GdkDisplay, it's a good excuse to
start.
Benjamin Otte [Fri, 2 Jul 2021 01:37:32 +0000 (03:37 +0200)]
x11: Redo choice between EGL and GLX
We try EGL first, but are very picky about what we accept.
If that fails, we try to go with GLX instead.
And if that also fails, we try EGL again, but this time accept anything.
The idea here is that EGL is the preferred method going forward, but GLX is
the tried and tested method that we know works. So if we detect issues with
EGL, we want to avoid using it in favor of GLX.
Also add a GDK_DEBUG=gl-egl option to force EGL at all costs and not try
GLX.
Benjamin Otte [Fri, 2 Jul 2021 01:21:14 +0000 (03:21 +0200)]
x11: Properly record the error when initializing GL
That way, we can give a useful error message when things break down for
users.
These error messages could still be improved in places (like looking at
the actual EGL error codes), but that seemed overkill.
Benjamin Otte [Fri, 2 Jul 2021 00:33:18 +0000 (02:33 +0200)]
x11: Do not call glXQueryExtension()
epoxy does that already.
Benjamin Otte [Fri, 18 Jun 2021 12:46:24 +0000 (14:46 +0200)]
x11: Get Visual from EGL directly
Query the EGL_VISUAL_ID from the egl Config and select a config with the
matching Visual.
This is currently broken on Mesa because it does not expose any RGBA
X Visuals in any EGL config, so we always end up with opaque Windows.
https://gitlab.freedesktop.org/mesa/mesa/-/issues/149
Benjamin Otte [Tue, 29 Jun 2021 21:45:50 +0000 (23:45 +0200)]
x11: Store the GLX drawable in the surface
Also, stop using a dummy window for unattached GL contexts and instead
use the display's leader surface.
Again, this mirrors EGL.
Benjamin Otte [Tue, 29 Jun 2021 20:10:48 +0000 (22:10 +0200)]
x11: Use single GLX fbconfig and store it in the display
This mirrors the code for the EGL config.
Benjamin Otte [Tue, 29 Jun 2021 16:45:04 +0000 (18:45 +0200)]
x11: Remove glx version check
We only work with GLX >= 1.3 anyway, so don't explicitly check for it
and pretend to do something else that doesn't work otherwise.
Benjamin Otte [Tue, 29 Jun 2021 16:44:09 +0000 (18:44 +0200)]
x11: Remove unused struct member
We don't care if the GL context is direct at all.
Benjamin Otte [Tue, 15 Jun 2021 12:48:55 +0000 (14:48 +0200)]
Revert "x11: Always fall back to GLX on NVIDIA"
This reverts commit
c35a6725b99722d91b0ed6580546c27c8f0849ba.
This approach doesn't work because if NVIDIA doesn't work for EGL, the
EGL implementation won't be provided by NVIDIA, so checking the vendor
doesn't work.
Benjamin Otte [Sun, 13 Jun 2021 21:35:06 +0000 (23:35 +0200)]
x11: Remove the dummy surface
Instead, use the display's "leader surface" when no surface is required,
because we have it lying around.
Really, we want to use EGL_NO_SURFACE, but if that's not supported...
Benjamin Otte [Sun, 13 Jun 2021 15:43:15 +0000 (17:43 +0200)]
x11: Remove GdkVisual
It's not used anymore.
Benjamin Otte [Sun, 13 Jun 2021 15:34:55 +0000 (17:34 +0200)]
x11: Rework Visual selection
Instead of going via GdkVisual, doing a preselection and letting the GL
initialization improve it, let the GL initialization pick an X Visual
directly using X Visual code directly.
The code should select the same visuals as before as it tries to apply
the same logic, but it's a rewrite, so I expect I messed something up.
Benjamin Otte [Sat, 12 Jun 2021 09:13:22 +0000 (11:13 +0200)]
glx: Remove Visual cache
1. We're using EGL most of the time anyway, so if we wanted to cache
things, we'd need to port it there.
2. Our GL handling is massively configurable, so determining when to use
the cache and when not is a challenge.
3. It makes startup nondeterministic and depend on whether a GTK4 app
has previously been started on this display and nobody thinks about
that when debugging.
4. The only benefit of the caching is delaying GL initialization - which
made sense in GTK3 where almost no app used GL but doesn't make sense
in GTK4 where almost every app uses GL.
So unless I find a big benefit to reintroducing it, this cache will be
gone for good.
Benjamin Otte [Sat, 12 Jun 2021 09:07:24 +0000 (11:07 +0200)]
x11: Move GL init code into the GL context
No functional changes, just shuffling code.
Benjamin Otte [Thu, 10 Jun 2021 21:10:22 +0000 (23:10 +0200)]
x11: Store the EGL surface in the GdkSurfaceX11
Avoids having to use private data, though the benefit is somewhat
limited as we still have to put the destructor in the egl code and can't
just put it in gdk_surface_x11_finalize().
Benjamin Otte [Wed, 9 Jun 2021 11:42:19 +0000 (13:42 +0200)]
x11: Store the EGL config in the display
We only have one config, because we use the same Visual everywhere.
Store this config in the GdkDisplayX11 struct for easy access.
Also do this on initialize, because if creating the config fails, we
want to switch to GLX instead of failing to do GL at all.
This also simplifies a lot of code as we can share Visual, Colormap, etc
across surfaces.
Benjamin Otte [Mon, 7 Jun 2021 12:30:29 +0000 (14:30 +0200)]
x11: Move the EGL display into the private struct
There's no need to use g_object_set_data() for it.
We can also stop caching it elsewhere because we know the display has
it.
And finally, we can remove the display->have_egl boolean and use
display->egl_display != NULL instead. We initialize the display at
startup, so that variable is the perfect indicator.
Benjamin Otte [Sun, 6 Jun 2021 17:56:35 +0000 (19:56 +0200)]
x11: Pass the display, not the screen
Screens are on their way out.
Benjamin Otte [Sun, 6 Jun 2021 15:29:29 +0000 (17:29 +0200)]
x11: Simplify code
These variables were a lot more important in GTK3, but now we just want
to pass them through to X.
Benjamin Otte [Sun, 6 Jun 2021 15:18:16 +0000 (17:18 +0200)]
x11: Move function call
The GLX visual selection is GLX specific, so it can be handled by the GLX
code.
There should be no reordering here, the call was just moved.
Benjamin Otte [Sun, 6 Jun 2021 15:14:31 +0000 (17:14 +0200)]
glx: Don't initialize GLX multiple times.
Either it is initialized or it isn't.
Benjamin Otte [Sun, 6 Jun 2021 15:07:05 +0000 (17:07 +0200)]
x11: Initialize GL at startup
We need to initialize GL to select the Visual we are going to use for
all our Windows.
As the Visual needs to be known before we know if we are even gonna use
GL later, we can't avoid initializing it.
Note that this previously happened, too. It was just hidden behind the
GdkScreen initialization.
Benjamin Otte [Thu, 3 Jun 2021 17:20:51 +0000 (19:20 +0200)]
x11: Don't share cached GLX visuals with GTK3
We don't want to bind ourselves to GTK3 - both because we don't want to
accidentally cause bugs in a different codebase and because we want to
deviate from it.
While doing so, also store visuals as visuals and not as integers.
And only store one Visual because GTK4 only uses one visual.
And then remove the code that is leftover for dealing with the
compatibility Visual for GTK3.
PS: I'm kinda proud of my STRINGIFY_WITHOUT_BRACKETS hack.
Benjamin Otte [Thu, 3 Jun 2021 03:02:15 +0000 (05:02 +0200)]
x11: Reorder code
Initialize the GL visuals from gdkdisplay.c so the call into the GL
stack isn't hidden in gdkvisual.c
This is relevant for further commits.
Benjamin Otte [Thu, 3 Jun 2021 02:54:37 +0000 (04:54 +0200)]
x11: Stop reordering visuals
The old code was ordering visuals by depth, but considering that these
days we either use the default visual or a 32bit RGBA visual, that
reordering does not have an effect anymore.
In theory, the only effect is that the GLX Visual selection might select
a different replacement Visual when it checks for improved GL Visuals, but
even there I can't come up with a case where that matters, because
again, the visuals are only reordered by depth and we want to keep the
depth.
In any case, make this a separate commit so bisecting can find this
problem if it ever shows up.
Benjamin Otte [Thu, 3 Jun 2021 02:45:36 +0000 (04:45 +0200)]
x11: Remove unused function
Now that we can't create extra GdkX11Screens anymore, this also means
that there is exactly 1 GdkX11Screen per GdkX11Display.
Benjamin Otte [Thu, 3 Jun 2021 02:42:23 +0000 (04:42 +0200)]
x11: Move code where it belongs
Instead of the display telling the screen to tell the visuals to tell
the display to initialize itself, just init the display directly.
What a concept.
Benjamin Otte [Mon, 7 Jun 2021 12:56:25 +0000 (14:56 +0200)]
build: Build demos before tools
That's a sneaky trick so my edit/compile/test cycle goes faster:
I usually use demos for testing so the tools don't have to be linked for
me to start testing.
Matthias Clasen [Wed, 21 Jul 2021 21:33:53 +0000 (21:33 +0000)]
Merge branch 'destroy-pointer-gestures' into 'master'
gdk/wayland: Clean up gestures if pointer capability is withdrawn
See merge request GNOME/gtk!3697
Vlad Zahorodnii [Tue, 22 Jun 2021 06:23:42 +0000 (09:23 +0300)]
gdk/wayland: Clean up gestures if pointer capability is withdrawn
If the pointer capability is added, pointer swipe and pinch gestures
will be created. However, if the pointer capability is removed, the
gesture objects won't be destroyed.
If the pointer capability is removed and added several times in a row,
for example due to plugging and unplugging physical mouse, this can lead
to leaking the old gesture objects.
In order to prevent that, this change makes the seat destroy swipe and
pinch gestures when the pointer capability is withdrawn.