Skip to content

GJS problem #14

@mannfuri

Description

@mannfuri

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions