-
Notifications
You must be signed in to change notification settings - Fork 772
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Preparation for GTK4 #3306
Preparation for GTK4 #3306
Conversation
We already don't use it. There is only a comment about using |
Right, I also stumbled over this, maybe mark this after I removed the comment. |
That will be very hard, since the new input system hardly relies on that. |
As I see it, this only means that we must use getters to retrieve the information from GdkEvent structs. The input system is rigged to move all data from these GdkEvent structs to our own struct. All our input handlers work on our own structs. So we would only need to make sure that this conversion uses the appropriate getters. See
|
@LittleHuba oh meant actually this: |
The description here does not sound that different from what we currently do... |
Could you provide me with some resources on the changes that cause your concerns? |
That the way how we should do it, is to write our own eventControllers, if the existing ones don't suffice. But the only way to port the NewInput System is to connect it to a LegacyInputController. Dunno, which implications this has. |
Can't we reuse the same concept we currently use and simply forward all events from a new eventController to our input system? As the events are propagated from parent to child, this controller would sit on the widget of the drawing area. Same as before as far as I remember. |
Yes, that's the same as using a LegacyInputController. But it is very dirty. Most of the things we do in the input system and what we also planned to do in the future, is already part of the new EventControler system. So we should transform the input system to adapt those. |
In that case, I would go with the LegacyInputController for now and switch to the new concept in a follow-up PR. Otherwise, this PR will grow very big and stop progress for other PRs as it influences many parts of the source. |
I think this PR is already ready to merge, most of all changes will require a switch to gtk4 directly. |
Needs to be rebased. |
6af1ffd
to
7821d24
Compare
@Technius it's rebased, I also rebased the gtk4 branch, but I suppose I broke many lines of code there. |
7f1db49
to
d3a36bb
Compare
@Technius I'll merge this in 24h hours if there are no objections |
On commit 3625e7b: There are more |
Yes, that issue is too big for this first step. Also many Event structs aren't even implented in gtk3. |
Honestly it would be better to rewrite the application from scratch than porting it😔 |
We can always consider restarting on the GUI. The file format and input handling are quite decoupled from it. |
We also have to restructure the input handling, since gtk3 events are deprecated and should be replaced by Event controllers. |
It defines replacement functions for gtk3-gtk4
d3a36bb
to
4f8642a
Compare
@reviewers, please review commit by commit.
https://docs.gtk.org/gtk4/migrating-3to4.html
gdk_pointer_warp()
gtk_widget_set_app_paintable
GtkBox
padding, fill and expand child propertiesGtkStyleContext
gettersgdk_pixbuf_get_from_window()
andgdk_cairo_set_source_window()
GtkButton
's image-related APIGtkWidget
event signalsgtk_main()
and related APIsgtk_widget_destroy()
==== HArder to fullfill, since the API is not fully replaced ====