MCPcopy Create free account
hub / github.com/material-shell/material-shell / setMonitor

Method setMonitor

src/layout/main.ts:467–479  ·  view source on GitHub ↗
(monitor: Main.Monitor)

Source from the content-addressed store, hash-verified

465 }
466
467 setMonitor(monitor: Main.Monitor) {
468 if (this.bgManager) {
469 this.bgManager.destroy();
470 }
471 this.monitor = monitor;
472 this.set_size(monitor.width, monitor.height);
473 this.set_position(monitor.x, monitor.y);
474 this.updateSpacer();
475 this.bgManager = new Background.BackgroundManager({
476 container: this.bgGroup,
477 monitorIndex: monitor.index,
478 });
479 }
480
481 vfunc_allocate(box: Clutter.ActorBox) {
482 this.set_allocation(box);

Callers 3

constructorMethod · 0.95
registerToSignalsMethod · 0.45
onMonitorsChangedMethod · 0.45

Calls 4

updateSpacerMethod · 0.95
destroyMethod · 0.65
set_sizeMethod · 0.65
set_positionMethod · 0.65

Tested by

no test coverage detected