GJS problem
mannfuri opened this issue · comments
Every time I log out and log back into the system, there is always an invisible GJS process that occupies one workspace. Even after I kill it in the command line, it gets started again by this script and creates a new workspace for it.
so i use chatgpt to help me for this problem.
// function handleWindowClose(act) {
// let win = act.meta_window;
// let name = win.get_id();
// if (_old_workspaces[name] !== undefined) {
// win.get_display().get_workspace_manager().get_workspace_by_index(_old_workspaces[name]).activate(global.get_current_time());
// }
// };
function handleWindowClose(act) {
let win = act.meta_window;
let name = win.get_id();
if (_old_workspaces[name] !== undefined && name !== 'gjs') { // 避免激活 "GJS" 窗口所在的工作区
win.get_display().get_workspace_manager().get_workspace_by_index(_old_workspaces[name]).activate(global.get_current_time());
}
}
it seems work well for now.
I use Ubuntu 22.04.2 LTS X64 with gnome 42.5
It has a conflict with gJs. when I turn on this extension will always show gjs, and the same extensions are not available on ubuntu 22.04 with GNOME 42.9.