Skip to content

Commit

Permalink
Merge pull request #204 from soal/gnome-38-button-moving-fix
Browse files Browse the repository at this point in the history
Fixed moving window buttons in GNOME 3.38
  • Loading branch information
jonian authored Sep 26, 2020
2 parents b72f464 + 16de42d commit 26a94ea
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions [email protected]/panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,13 +146,15 @@ var WindowButtons = class WindowButtons extends PanelExtension {

_onPositionChange() {
const controls = this.controls.container

if (controls.reparent) {
controls.reparent(this.container)
} else {
controls.unparent()
controls.set_parent(this.container)
}
const currentParent = controls.get_parent()
if (currentParent) {
currentParent.remove_child(controls)
this.container.add_child(controls)
}
}

if (this.index != null) {
this.container.set_child_at_index(controls, this.index)
Expand Down

0 comments on commit 26a94ea

Please sign in to comment.