Closed andreastedile closed 3 years ago
I discoved that the same issue occurs even if I click outside the dropdown menu.
Can confirm this, it happens on every dropdown menu in the system.
I do not have time to debug this further today, but it happens only when using wayland. Seems like the creation of the dropdown triggers the preview. After that by giving any input (either by mouse or keyboard) triggers a wayland crash. I'm glad to contribute any way I can @micahosborne though I lack knowledge about gnome-shell :)
This would be most likely grab-operation-begin call back in app.ts. Probably need to filter which windows are activated. Maybe if the window is borderless or not sizeable then don't show the preview. I'm limited on time at the moment, but i'm guessing this would be where to start.
This bug can be fixed by filtering the windows by their window_type.
In the meantime as a workaround (that should solve also #11), i filtered out every window that does not have type '0' (META_WINDOW_NORMAL). This is needed on each event callback and in TabbedZoneManager::layoutWindows().
Callbacks like 'window-created' become:
global.display.connect('window-created', (_display, win, op) => {
log('window-created ' + _display + 'win ' + win);
if (win != null && win.get_window_type() == 0) {
if (this.tabManager) {
this.tabManager.layoutWindows();
}
}
});
and TabbedZoneManager::layoutWindows():
let wsm = (global.workspace_manager);
let ws = wsm.get_n_workspaces();
log("Workspace Index " + ws);
let windows = wsm
.get_active_workspace()
.list_windows()
.filter(w => w.get_window_type() == 0);
edit: i found out what that 0 means. Let me know if you are okay with the fix and i'll open you a PR later.
Cool thanks for the effort, and for sure, submit a pull request and i'll pull it in :) contributions always welcome. I never planned on doing this extension all by myself :)
The crash occurs as soon as I click on an item of the dropdown menu. Sometimes after the crash the login screen does not even appear.
https://user-images.githubusercontent.com/39307731/129707276-496b7485-7e6b-48d2-8cc4-e4882b7fba64.mp4