Matthias Clasen
3766f1da8b
Add another baseline test client
2023-04-28 08:50:12 -04:00
Matthias Clasen
bedc3dba7e
filechooser: Plug a memory leak
2023-04-27 13:42:03 +02:00
Matthias Clasen
7c4acac135
Add some more valgrind suppressions
2023-04-27 13:42:03 +02:00
Matthias Clasen
0bb6988c0e
columnview: Plug a memory leak
...
g_list_model_get_item strikes again.
2023-04-27 13:42:03 +02:00
Matthias Clasen
df3622b295
filechooser: Plug a memory leak
...
We own references to the columns. Drop them.
2023-04-27 13:42:03 +02:00
Matthias Clasen
df9f3fc694
filechoosernative: Plug a memory leak
...
Unref all the GVariants.
2023-04-27 13:42:03 +02:00
Matthias Clasen
39b3b2444b
filedialog: Plug a memory leak
...
We own a reference to the native dialog,
and we need to drop it when we're done.
2023-04-27 13:42:03 +02:00
Matthias Clasen
c237643b24
node-editor: Plug a memory leak
2023-04-27 13:42:03 +02:00
Matthias Clasen
cc682a96d9
notebook: Drop an unused variable
2023-04-27 13:42:03 +02:00
Matthias Clasen
051b463c9a
Fix various bitfield warnings
...
clang rightly complains about using gboolean
as type for bitfields, since it is signed.
Avoid that.
2023-04-27 13:42:03 +02:00
Matthias Clasen
9ae0a3865c
Merge branch 'matthiasc/for-main' into 'main'
...
Fix the build with clang
See merge request GNOME/gtk!5876
2023-04-27 04:37:12 +00:00
Benjamin Otte
3b5a2d60c7
Merge branch 'wip/otte/gl-version' into 'main'
...
Make sure highest possible version GLContext is created
See merge request GNOME/gtk!5870
2023-04-27 00:39:19 +00:00
Benjamin Otte
9254ab8503
wgl: Improve error messages when GL init fails
...
In particular, we want to get the GL version, when the Windows box/VM
has an unsuitable GL implementation.
This is somewhat helpful in analyzing failures to bring up GL on
machines where users claim GL does work.
2023-04-27 02:19:25 +02:00
Benjamin Otte
d6afcee1e4
wgl: Create context during WGL initialization
...
This way, we can realize it and either print success information about
it or return NULL if that fails.
This makes it more likely that we fail early, which means we can then
initialize EGL.
2023-04-27 02:16:46 +02:00
Benjamin Otte
c71ca481c1
win32: Get rid of display->gl_version
...
We can just query the display's GL context.
And it's not used otherwise anymore.
2023-04-27 02:13:33 +02:00
Benjamin Otte
8ef38c46b5
win32: Refactor context creation
...
This refactor achieves the following:
* check GL version against proper matching context version
In particular, for legacy contexts, we now actually check
* make sure the actual version is set, even for legacy contexts
* make sure set_is_legacy() is set properly
2023-04-27 02:13:33 +02:00
Benjamin Otte
4333d754b8
gdk: Add workaround for Visual Studio
...
apparently casting something to itself makes it not constant.
2023-04-27 02:13:33 +02:00
Benjamin Otte
9f82d537b0
mac: Properly set GLContext.is_legacy()
2023-04-27 02:13:32 +02:00
Benjamin Otte
7c7a3d67ca
glcontext: assert all contexts set the version on realize()
...
Now that all contexts do that, insist that they keep doing it.
And because they keep doing it, we can support querying the GL version
from gdk_gl_context_get_version() without requiring the context to be
made current.
2023-04-27 02:13:32 +02:00
Benjamin Otte
d33b82249b
mac: Try all different OpenGL profiles
...
.. and pick the best one that is supported.
Also make sure that the resulting context has at least the desired
version, otherwise bail.
2023-04-27 02:13:32 +02:00
Benjamin Otte
5f833f1d31
glcontext: Compute matching version the simple way
...
Do it all in one function instead of requiring two different ones.
2023-04-27 02:13:32 +02:00
Benjamin Otte
b8958419e6
win32: Make sure highest possible GL version is created
...
Mirror EGL here.
2023-04-27 02:13:32 +02:00
Benjamin Otte
919c90182f
win32: Pass the version properly through the creation stack
...
We were using major/minor instead of GdkGLVersion.
And we were resetting back to 0 and ignoring the required min version
which we should not do.
2023-04-27 02:13:32 +02:00
Benjamin Otte
ab2a548479
glx: Make sure highest possible GL version is created
...
Mirror EGL here.
2023-04-27 02:13:32 +02:00
Benjamin Otte
34662fc4b0
egl: Make sure highest possible GL version is created
...
The EGL spec states:
The context returned must be the specified version, or a later
version which is backwards compatible with that version.
Even if a later version is returned, the specified version
must correspond to a defined version of the client API.
GTK has so far been relying on EGL implementations returning a
later version, because that is what Mesa does.
But ANGLE does not do that and only provides the minimum version, which
means Windows EGL has been forced to use a lower EGL version for no
reason.
So fix this and try versions in order from highest to lowest.
2023-04-27 02:13:32 +02:00
Benjamin Otte
5b376cedcf
gdk: Move GdkGLAPI enum into gdkenums.h
2023-04-27 02:13:32 +02:00
Benjamin Otte
3aefed39b1
glcontext: Use GdkGLVersion elsewhere
...
... and add a convenience API to generate GL versions from strings to
make the gdk_gl_context_check() API nicer.
2023-04-27 02:13:32 +02:00
Benjamin Otte
f86429177a
gdk: Introduce GdkGLVersion
...
... and use it.
Makes the code simpler.
2023-04-27 02:13:32 +02:00
Benjamin Otte
dacfed3e11
win32: Remove an outdated check
...
We require GL 3.0, so checking for less than 2.0 makes no sense anymore.
2023-04-27 02:13:32 +02:00
Matthias Clasen
8fb2ee7d67
Fix a crash
...
Fix an oversight from c87b193d2a
.
2023-04-27 00:09:18 +02:00
Benjamin Otte
29e7186829
Merge branch 'wip/otte/treelistmodel-madness' into 'main'
...
treelistmodel: Be safer during collapsing
See merge request GNOME/gtk!5875
2023-04-26 22:06:40 +00:00
Matthias Clasen
951e3b3d6b
Fix the build with clang
...
This broke our macos ci.
2023-04-26 23:54:43 +02:00
Benjamin Otte
3c76f3fb58
treelistmodel: Delay notifies from TreeListRow
...
Don't notify during destruction, notify afterwards.
This way we don't call into user code from a half-destructed node.
Note that this changes the order in which those notifies happen when
collapsing a large tree: From parent node before child nodes to child
nodes before parent node.
No actual use case for this, just thought it would be safer.
2023-04-26 23:40:56 +02:00
Benjamin Otte
8766a6fab2
treelistmodel: Be safer during collapsing
...
While we are collapsing a subtree, some signal handlers may not be
disconnected while we are doing this. By adding this check and not
giving those nodes no longer access to the model, we can stop it from
modifying it while we are trying to collapse stuff.
Fixes some crashes in gnome-builder.
2023-04-26 23:30:37 +02:00
Benjamin Otte
f52975c220
Merge branch 'wip/otte/surface-surgery' into 'main'
...
refactor internal surface API
See merge request GNOME/gtk!5846
2023-04-26 21:03:24 +00:00
Daniel Boles
abd4a57031
3to4: Fix we said we replace doubles with doubles,
...
when what we are replacing are ints!
2023-04-26 21:30:10 +01:00
Benjamin Otte
9d0448756f
display: Remove ::create_surface() vfunc
...
Instead, have a toplevel_type and popup_type in GdkDisplay and
call g_object_new() with those types.
2023-04-26 21:03:34 +02:00
Benjamin Otte
03d7ce3287
wayland: Set default title in toplevel_init()
2023-04-26 21:03:34 +02:00
Benjamin Otte
f2083d36a1
macos: Add surface from ::constructed()
2023-04-26 21:03:34 +02:00
Benjamin Otte
cb642bec25
gdk: Remove GDK_SURFACE_DRAG enum member
...
I want to remove the whole enum, but this value was used all over the
place. So removing it first ensures I didn't forget anything.
2023-04-26 21:03:34 +02:00
Benjamin Otte
8c530264f7
wayland: Create drag surface directly
...
... instead of going through create_surface().
2023-04-26 21:03:34 +02:00
Benjamin Otte
d99042dd91
wayland: Remove struct member
...
It's unused.
2023-04-26 21:03:34 +02:00
Benjamin Otte
486196c979
x11: Add private gdk_x11_drag_surface_new()
...
... and use it.
2023-04-26 21:03:34 +02:00
Benjamin Otte
83faacabe3
x11: Set frame clock in ::constructed
2023-04-26 21:03:34 +02:00
Benjamin Otte
31aae62f9a
x11: Move window construction to ::constructed()
2023-04-26 21:03:34 +02:00
Benjamin Otte
726be8e2b2
broadway: Create gdk_broadway_drag_surface_new()
...
... and use it.
2023-04-26 21:03:34 +02:00
Benjamin Otte
ab0fa08d8e
win32: Create gdk_win32_draw_surface_new()
...
... and use it.
2023-04-26 21:03:34 +02:00
Benjamin Otte
42cea18f3e
macos: Set frame clock in ::constructed
2023-04-26 21:03:34 +02:00
Benjamin Otte
44e54e1b4c
broadway: Set frame clock in ::constructed
...
... instead of passing it to g_object_new().
2023-04-26 21:03:34 +02:00
Benjamin Otte
a79ae95e7e
broadway: Move surface init code into ::constructed()
2023-04-26 21:03:34 +02:00