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
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
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
Benjamin Otte
77fe9116af
win32: Set frame clock in constructed()
...
... instead of passing it as construct argument.
2023-04-26 21:03:34 +02:00
Benjamin Otte
808cde74be
wayland: Construct the frame clock in the surface
...
... instead of passing it to g_object_new().
2023-04-26 21:03:34 +02:00
Benjamin Otte
13120ccf9d
surface: Make gdk_surface_set_frame_clock() available
...
... to backends.
That way, frame clocks can be constructed by the backends' surface
implementations and dont need to be passed in as construct arguments.
Also add an assertion that they are indeed constructed.
2023-04-26 21:03:34 +02:00
Benjamin Otte
a306401023
macos: Move native window creation to ::constructed()
...
That way, it doesn't need a specific init function.
Also chain up last, so that the generic initialization code in
GdkSurface::constructed can access a fully initialized macos surface.
2023-04-26 21:03:34 +02:00
Benjamin Otte
7e18a1cea7
macos: Don't pass sizes to macos_surface_new()
...
They're 0, 0, 100, 100 always, so just use those values everywhere.
2023-04-26 21:03:34 +02:00
Benjamin Otte
9a6e6be785
macos: Create drag surface directly
...
Do not go via macos_surface_new().
2023-04-26 21:03:34 +02:00
Benjamin Otte
093a4e83d5
macos: Move construction stuff into ::constructed
2023-04-26 21:03:34 +02:00
Benjamin Otte
428798b53f
macos: toplevels have no parent
2023-04-26 21:03:34 +02:00
Benjamin Otte
4fa81cf70f
win32: Move surface init code into ::constructed()
2023-04-26 21:03:34 +02:00
Benjamin Otte
9ac31fe0a0
win32: Abort on error
...
Returning NULL from a function that must not return NULL is not a good
idea.
2023-04-26 21:03:34 +02:00
Benjamin Otte
69fabb3ce9
win32: Remove outdated debug messages
...
They are not needed anymore as they print stuff that's no decided in
that function anymore.
2023-04-26 21:03:34 +02:00
Benjamin Otte
f59c230a96
win32: Move toplevel signal into the toplevel class
2023-04-26 21:03:34 +02:00
Benjamin Otte
80d99b893e
broadway: Pass parent as a construct argument
2023-04-26 21:03:34 +02:00
Benjamin Otte
cbe89b955a
x11: Get rid of sizes when constructing surfaces
...
Just call XCreateWindow with 0, 0, 1, 1 size.
2023-04-26 21:03:34 +02:00
Benjamin Otte
2d827978a6
x11: Remove unused variable
2023-04-26 21:03:34 +02:00
Benjamin Otte
b2e304189e
wayland: Move surface initialization into constructed()
...
That way, it doesn't ned a specific init function.
Also chain up last, so that the generic initialization code can access a
fully initialized wayland surface.
2023-04-26 21:03:34 +02:00
Benjamin Otte
35c2d85468
wayland: Move toplevel-specific code into the toplevel
...
The display->toplevels tracking belongs to GdkWAylandToplevel.
2023-04-26 21:03:34 +02:00
Benjamin Otte
7ef5f6ef1a
display: Remove x/y/w/h from create_surface()
2023-04-26 21:03:34 +02:00
Matthias Clasen
9364da673f
Merge branch 'application-signal-cleanup' into 'main'
...
application: Clean up signal handlers
See merge request GNOME/gtk!5872
2023-04-26 13:11:43 +00:00
Matthias Clasen
c87b193d2a
application: Clean up signal handlers
...
This is the right thing to do and might help for #5775 .
2023-04-26 14:15:31 +02:00
Matthias Clasen
045ab0f107
Merge branch 'win32-warnings' into 'main'
...
Fix some win32 warnings
See merge request GNOME/gtk!5868
2023-04-26 06:58:09 +00:00
Matthias Clasen
27d9023ac8
Merge branch 'pathbar-webdav-root' into 'main'
...
pathbar: Handle webdav where is the root is a path
Closes #2866
See merge request GNOME/gtk!5830
2023-04-26 06:50:10 +00:00
Matthias Clasen
8a82e1b8b4
Merge branch 'matthiasc/for-main' into 'main'
...
gsk: Don't misuse bitwise operators
See merge request GNOME/gtk!5869
2023-04-26 06:49:32 +00:00
Matthias Clasen
8e695f7c56
Merge branch 'modelbutton-no-click-outside' into 'main'
...
gtkmodelbutton: Ignore releases outside of the button
Closes #5760
See merge request GNOME/gtk!5852
2023-04-26 05:56:31 +00:00
Fran Dieguez
1f886668ce
Update Galician translation
...
(cherry picked from commit 7470bc01f2
)
2023-04-25 23:22:28 +00:00
Sebastian Keller
a678e9fdd9
gtkmodelbutton: Ignore releases outside of the button
...
This is also how regular buttons behave. Otherwise releasing on a
different menu item would register a click on the item that was
originally pressed. In these cases it is better to not register a click
at all.
Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/5760
2023-04-25 19:28:42 +02:00
Matthias Clasen
74c0171edf
gsk: Don't misuse bitwise operators
...
We should use && for booleans, not &=.
2023-04-25 16:43:02 +02:00
Matthias Clasen
248d13d8dc
Merge branch 'matthiasc/for-main' into 'main'
...
gsk: Don't misuse bitwise operators
See merge request GNOME/gtk!5867
2023-04-25 12:48:13 +00:00