Skip to content

Commit cf852f9

Browse files
committed
Fix decoration issues on x11 on gnome-shell/mutter 44
- Change _HIDE_FLAGS to use 0x0 in decorations fields of _MOTIF_WM_HINTS - Change ServerDecorations.handle to use a boolean flag tracking whether the window decorations were previously hidden by united, because mutter now keeps `window->decorated` in sync with `window->mwm_decorated` - Change ServerDecorations.decorated to use `this.win.decorated` since that flag is now kept up-to-date. Additionally, win.get_frame_type() now seems to never become Meta.FrameType.BORDER Fixes: #324
1 parent 9f0c85d commit cf852f9

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

[email protected]/window.js

+6-4
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const VALID_TYPES = [
1919
const MOTIF_HINTS = '_MOTIF_WM_HINTS'
2020

2121
const _SHOW_FLAGS = ['0x2', '0x0', '0x1', '0x0', '0x0']
22-
const _HIDE_FLAGS = ['0x2', '0x0', '0x2', '0x0', '0x0']
22+
const _HIDE_FLAGS = ['0x2', '0x0', '0x0', '0x0', '0x0']
2323

2424
function isValid(win) {
2525
return win && VALID_TYPES.includes(win.window_type)
@@ -59,14 +59,15 @@ var ServerDecorations = class ServerDecorations {
5959
constructor({ xid, win }) {
6060
this.xid = xid
6161
this.win = win
62+
this.hidden_by_us = false
6263
}
6364

6465
get decorated() {
65-
return this.win.get_frame_type() !== Meta.FrameType.BORDER
66+
return this.win.decorated
6667
}
6768

6869
get handle() {
69-
return this.win.decorated
70+
return this.hidden_by_us
7071
}
7172

7273
show() {
@@ -76,7 +77,8 @@ var ServerDecorations = class ServerDecorations {
7677
}
7778

7879
hide() {
79-
if (this.handle && this.decorated) {
80+
if (this.decorated) {
81+
this.hidden_by_us = true
8082
setHint(this.xid, MOTIF_HINTS, _HIDE_FLAGS)
8183
}
8284
}

0 commit comments

Comments
 (0)