-
Notifications
You must be signed in to change notification settings - Fork 19
Fix Inaccurate Window Movement in Linux Framebuffer Backend #107
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
base: main
Are you sure you want to change the base?
Conversation
@@ -190,7 +190,8 @@ static bool twin_fbdev_update_damage(void *closure) | |||
twin_fbdev_t *tx = PRIV(closure); | |||
twin_screen_t *screen = SCREEN(closure); | |||
|
|||
if (!tx->vt_active && twin_screen_damaged(screen)) | |||
if (!tx->vt_active && (tx->fb_base == MAP_FAILED) && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the condition tx->fb_base == MAP_FAILED
be considered as an early return?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I experimented based on the following code and found that the issue still persists.
--- a/backend/fbdev.c
+++ b/backend/fbdev.c
@@ -190,6 +190,9 @@ static bool twin_fbdev_update_damage(void *closure)
twin_fbdev_t *tx = PRIV(closure);
twin_screen_t *screen = SCREEN(closure);
+ if (tx->fb_base == MAP_FAILED)
+ return;
+
if (!tx->vt_active && twin_screen_damaged(screen))
twin_screen_update(screen);
I'm curious why adding condition |
Based on my current observations and experiments, I consider this PR suppresses the screen update behavior of |
Make git commit messages informative. |
Windows would jump to unexpected positions when moved with the mouse on the Linux framebuffer backend. By suppressing the screen update behavior of twin_fbdev_update_damage, this patch ensures more robust window dragging on Raspberry Pi 3B and virtual machines.
Windows would jump to unexpected positions when moving with the mouse on the Linux framebuffer backend. This patch, tested on Raspberry Pi 3B and virtual machines, ensures smoother and more reliable window dragging behavior.
Summary by Bito
This pull request fixes a bug in the Linux framebuffer backend that caused windows to jump during mouse movement. It improves window dragging behavior on Raspberry Pi 3B by modifying screen update conditions, enhancing user experience.