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

Fix active window not working on the framebuffer #94

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

weihsinyeh
Copy link
Collaborator

Remove the inefficiently function twin_active_pixmap(). This function finds the currently and previously active window pixel map by traversing the list of pixel maps. This function will be called every time the screen needs to be updated. Set the active variable of the window only when the window's event TwinEventButtonDown is triggered to avoid redundant operations. Additionally, implement the function twin_window_active_paint() to only repaint the title bar instead of calling the function twin_window_draw() to indirectly call the function twin_window_frame to repaint the title bar of the window.

Close #92

Remove the inefficiently function twin_active_pixmap(). This function
finds the currently and previously active window pixel map by traversing
the list of pixel maps. This function will be called every time the
screen needs to be updated. Set the active variable of the window only
when the window's event TwinEventButtonDown is triggered to avoid
redundant operations. Additionally, implement the function
twin_window_active_paint() to only repaint the title bar instead of
calling the function twin_window_draw() to indirectly call the function
twin_window_frame to repaint the title bar of the window.

Close sysprog21#92

Signed-off-by: Wei-Hsin Yeh <[email protected]>
@@ -156,6 +156,19 @@ void twin_window_set_name(twin_window_t *window, const char *name)
strcpy(window->name, name);
twin_window_draw(window);
}
static void twin_window_active_paint(twin_window_t *window)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing one empty line here.

@shengwen-tw
Copy link
Collaborator

Looks legitimate to me, but since I am not familiar with recent developments, I would like to see if others have different opinions.

@huaxinliao
Copy link
Collaborator

huaxinliao commented Jan 26, 2025

I confirmed that fbdev can run on a VM with Ubuntu 24.04 and a Pi 3B. Below is the output from the Pi 3B.

test.mp4

@weihsinyeh
Copy link
Collaborator Author

The title bars of the active and inactive window don't display on the video.

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

Successfully merging this pull request may close these issues.

Unexpected null screen in Linux framebuffer backend
3 participants