Xpra: Ticket #1977: GTK4
Assuming that we don't jump ship by then (#1995, the python3 / gtk3 transition is hard enough: #1568), we'll need to handle Migrating from GTK+ 3.x to GTK+ 4, in particular:
- Stop using the root window - ouch?
- Stop using GdkScreen, GdkVisual, GdkDeviceManager
- Adapt to GdkWindow API changes: GdkWindow has been renamed to GdkSurface. The gdk_window_new() function has been replaced by a number of more specialized constructors: gdk_surface_new_toplevel(), gdk_surface_new_popup(), gdk_surface_new_temp(), gdk_surface_new_child(), gdk_surface_new_input(), gdk_wayland_surface_new_subsurface(). Use the appropriate ones to create your windows.
Native and foreign subwindows are no longer supported. These concepts were complicating the code and could not be supported across backends.
gdk_window_reparent() is no longer available.
- Adapt to drawing model changes: If you are using a GtkDrawingArea for custom drawing, you need to switch to using gtk_drawing_area_set_draw_func() to set a draw function instead of connnecting a handler to the “draw” signal.
- Invalidation handling has changed: Only gtk_widget_queue_draw() is left to mark a widget as needing redraw. Variations like gtk_widget_queue_draw_rectangle() or gtk_widget_queue_draw_region() are no longer available.
- Stop using GtkWidget::draw: The “draw” signal has been removed. Widgets need to implement the “snapshot” function now. Connecting draw signal handlers is no longer possible.
- Adapt to cursor API changes..
- Stop accessing GdkEvent fields: Direct access to GdkEvent structs is no longer possible in GTK+ 4. Some frequently-used fields already had accessors in GTK+ 3, and the remaining fields have gained accessors in GTK+ 4.
Tue, 23 Oct 2018 05:22:44 GMT - Antoine Martin: status, description changed
changed from new to assigned
Wed, 20 Mar 2019 05:06:15 GMT - Antoine Martin: milestone changed
changed from 3.1 to 4.0
Sat, 21 Sep 2019 12:23:21 GMT - Antoine Martin: milestone changed
changed from 4.0 to future
Sat, 23 Jan 2021 05:38:51 GMT - migration script:
this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/1977