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

Add window rect check #177

Merged
merged 2 commits into from
Feb 3, 2023
Merged

Add window rect check #177

merged 2 commits into from
Feb 3, 2023

Conversation

kitlaan
Copy link
Contributor

@kitlaan kitlaan commented Jan 30, 2023

With Ubuntu 22.10's gnome-shell (43.1) and the current version on extensions.gnome.org (version 61?)...

I've been seeing some oddities when unlocking after leaving it locked for a "little while". I think it's because X is bouncing the DisplayPort display...?

gnome-shell[2846]: meta_monitor_manager_get_logical_monitor_from_number: assertion '(unsigned int) number < g_list_length (manager->logical_monitors)' failed
gnome-shell[2846]: meta_workspace_get_work_area_for_monitor: assertion 'logical_monitor != NULL' failed
...
gnome-shell[2846]: *** BUG ***
gnome-shell[2846]: In pixman_region32_init_rect: Invalid rectangle passed
gnome-shell[2846]: Set a breakpoint on '_pixman_log_error' to debug

After some judicious littering of Logger calls, I noticed that the padding computation was resulting in negative width and height values. I have no clue why it would happen, but adding a sanity check made the "invalid rectangle passed" error go away, and things seem to be working properly.

With the change and DEBUG logging enabled, it showed all the MONITOR and WINDOW nodes with zero-sized rects.

For example,

Forge: [DEBUG] render tree from workareas-changed
...
Forge: [DEBUG]     |   *--> MONITOR#0 @mo0ws0,layout:HSPLIT,rect:0x0+0+0
...

Note: I'm still not sure why the "monitor" assertions trigger yet, but it doesn't seem to be causing any problems.

@jmmaranan
Copy link
Collaborator

jmmaranan commented Jan 30, 2023

Thanks @kitlaan,I'll do some testing and let you know when okay to merge.

@kitlaan
Copy link
Contributor Author

kitlaan commented Jan 30, 2023

Feel free to ditch this PR and do something completely different; the change doesn't "feel right overall".

If I weren't just "hacking the symptoms", I would guess the check should be as early as possible -- maybe dropping the event processing entirely if there's no monitor?

@jmmaranan jmmaranan merged commit 25c7c41 into forge-ext:main Feb 3, 2023
@kitlaan kitlaan deleted the rect_check branch February 3, 2023 02:03
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.

2 participants