Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix decoration issues on x11 on gnome-shell/mutter 44 #334

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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