Skip to content
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

BACKENDS: DIALOG: GTK: Keep main window updated during GTK+ dialog #3493

Merged
merged 1 commit into from Nov 8, 2021

Conversation

@eriktorbjorn
Copy link
Member

@eriktorbjorn eriktorbjorn commented Nov 6, 2021

One thing that's always bothered me about the GTK+ dialogs is that the main window doesn't get updated while they are open. At least for me this causes ugly trails in the main window of anything that's moved across it while the dialog is open.

This patch adds an idle handler to keep the main window updated.

Maybe the idle handler should be part of the GtkDialogManager class, but https://stackoverflow.com/questions/21478803/member-function-as-callback-function-to-g-signal-connect suggested that it might be more portable to keep it outside the class? I don't know for sure.

I'd be grateful for feedback for anyone more familiar with GTK+ than me. (Which would be most people familiar with GTK+ at all.)

Otherwise, anything moving across the main window while the dialog is
open may leave ugly trails. At least it does for me.
@eriktorbjorn
Copy link
Member Author

@eriktorbjorn eriktorbjorn commented Nov 7, 2021

Example of what it can look like for me before this change. ScummVM doesn't update the main window, and apparently the window manager doesn't do anything to mitigate it:

unhappy-trails

The problem does go away if I "Enable display compositing" in my window manager. But I always keep that turned off since I haven't found any compelling reason to keep it turned on.

Loading

@sev-
Copy link
Member

@sev- sev- commented Nov 8, 2021

This is a marvellous addition, thank you, merging

Loading

@sev- sev- merged commit bb0ce7f into scummvm:master Nov 8, 2021
5 of 8 checks passed
Loading
@eriktorbjorn
Copy link
Member Author

@eriktorbjorn eriktorbjorn commented Nov 8, 2021

This is a marvellous addition, thank you, merging

Thanks. Though one thing I just noticed is that while the mouse is moving over the SDL main window, there's no cursor. This is not a regression, mind you, but I do wonder if there's any good way of fixing that.

Loading

@sev-
Copy link
Member

@sev- sev- commented Nov 9, 2021

Yes, you need to poll events as well.

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants