refactor: replace broken enum ClientAreaOption enum with a number

This commit is contained in:
Mikhail Zolotukhin 2022-03-24 23:12:48 +03:00 committed by Genda
parent 93e6f1406b
commit aa4504e32a
2 changed files with 10 additions and 10 deletions

View File

@ -56,9 +56,11 @@ export class DriverSurfaceImpl implements DriverSurface {
this.config.ignoreScreen.indexOf(screen) >= 0; this.config.ignoreScreen.indexOf(screen) >= 0;
this.workingArea = Rect.fromQRect( this.workingArea = Rect.fromQRect(
this.proxy this.proxy.workspace().clientArea(
.workspace() 0, // This is PlacementArea
.clientArea(this.kwinApi.KWin.PlacementArea, screen, desktop) screen,
desktop
)
); );
} }

View File

@ -276,13 +276,11 @@ export class DriverWindowImpl implements DriverWindow {
geometry = this.adjustGeometry(geometry); geometry = this.adjustGeometry(geometry);
if (this.config.preventProtrusion) { if (this.config.preventProtrusion) {
const area = Rect.fromQRect( const area = Rect.fromQRect(
this.proxy this.proxy.workspace().clientArea(
.workspace() 0, // This is placement area
.clientArea( this.client.screen,
this.kwinApi.KWin.PlacementArea, this.proxy.workspace().currentDesktop
this.client.screen, )
this.proxy.workspace().currentDesktop
)
); );
if (!area.includes(geometry)) { if (!area.includes(geometry)) {
/* assume windows will extrude only through right and bottom edges */ /* assume windows will extrude only through right and bottom edges */