* @param display * @param metaWindow {import("@gi-types/meta").Window}
(metaWindow)
| 3312 | * @param metaWindow {import("@gi-types/meta").Window} |
| 3313 | */ |
| 3314 | window_created(metaWindow) { |
| 3315 | if (!registerWindow(metaWindow)) { |
| 3316 | return; |
| 3317 | } |
| 3318 | |
| 3319 | metaWindow.unmapped = true; |
| 3320 | |
| 3321 | console.debug('window-created', metaWindow?.title); |
| 3322 | let actor = metaWindow.get_compositor_private(); |
| 3323 | animateWindow(metaWindow); |
| 3324 | |
| 3325 | /* |
| 3326 | We need reliable `window_type`, `wm_class` et. all to handle window insertion correctly. |
| 3327 | |
| 3328 | On wayland this is completely broken before `first-frame`. It's |
| 3329 | somewhat more stable on X11, but there's at minimum some racing with |
| 3330 | `wm_class` which can break the users winprop rules. |
| 3331 | */ |
| 3332 | signals.connectOneShot(actor, 'first-frame', () => { |
| 3333 | allocateClone(metaWindow); |
| 3334 | insertWindow(metaWindow, { existing: false }); |
| 3335 | }); |
| 3336 | } |
| 3337 | }; |
| 3338 | Signals.addSignalMethods(Spaces.prototype); |
| 3339 |
no test coverage detected