Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions [email protected]/window.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const VALID_TYPES = [
const MOTIF_HINTS = '_MOTIF_WM_HINTS'

const _SHOW_FLAGS = ['0x2', '0x0', '0x1', '0x0', '0x0']
const _HIDE_FLAGS = ['0x2', '0x0', '0x2', '0x0', '0x0']
const _HIDE_FLAGS = ['0x2', '0x0', '0x0', '0x0', '0x0']

function isValid(win) {
return win && VALID_TYPES.includes(win.window_type)
Expand Down Expand Up @@ -59,14 +59,15 @@ var ServerDecorations = class ServerDecorations {
constructor({ xid, win }) {
this.xid = xid
this.win = win
this.hidden_by_us = false
}

get decorated() {
return this.win.get_frame_type() !== Meta.FrameType.BORDER
return this.win.decorated
}

get handle() {
return this.win.decorated
return this.hidden_by_us
}

show() {
Expand All @@ -76,7 +77,8 @@ var ServerDecorations = class ServerDecorations {
}

hide() {
if (this.handle && this.decorated) {
if (this.decorated) {
this.hidden_by_us = true
setHint(this.xid, MOTIF_HINTS, _HIDE_FLAGS)
}
}
Expand Down