MCPcopy Index your code
hub / github.com/material-shell/material-shell / constructor

Method constructor

src/manager/msFocusManager.ts:25–52  ·  view source on GitHub ↗
(msWindowManager: MsWindowManagerType)

Source from the content-addressed store, hash-verified

23 focusProtected?: boolean;
24 actorGrabMap: Map<Clutter.Actor, boolean | Clutter.Grab> = new Map();
25 constructor(msWindowManager: MsWindowManagerType) {
26 super();
27 this.msWindowManager = msWindowManager;
28 this.observe(
29 global.stage,
30 'notify::key-focus',
31 this.onKeyFocus.bind(this)
32 );
33
34 this.observe(
35 global.display,
36 'notify::focus-window',
37 this.onWindowFocus.bind(this)
38 );
39
40 this.observe(
41 global.workspace_manager,
42 'active-workspace-changed',
43 () => {
44 if (!Me.instance.loaded) return;
45 this.focusProtected = true;
46 Async.addTimeout(GLib.PRIORITY_DEFAULT, 100, () => {
47 delete this.focusProtected;
48 return GLib.SOURCE_REMOVE;
49 });
50 }
51 );
52 }
53
54 onKeyFocus(): void {
55 const keyFocus = global.stage.key_focus;

Callers

nothing calls this directly

Calls 3

addTimeoutMethod · 0.80
bindMethod · 0.65
observeMethod · 0.45

Tested by

no test coverage detected