Skip to content

Commit

Permalink
Fix border refresh on scale change
Browse files Browse the repository at this point in the history
  • Loading branch information
andydotxyz committed Jan 3, 2020
1 parent a652aa9 commit 2941fe8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
10 changes: 10 additions & 0 deletions wm/frame.go
Expand Up @@ -415,6 +415,16 @@ func (f *frame) updateTitle() {
f.applyTheme(true)
}

func (f *frame) updateScale() {
xproto.FreePixmap(f.client.wm.x.Conn(), f.borderTop)
f.borderTop = 0
xproto.FreePixmap(f.client.wm.x.Conn(), f.borderTopRight)
f.borderTopRight = 0

f.updateGeometry(f.x, f.y, f.width, f.height, true)
f.applyTheme(true)
}

func (f *frame) borderWidth() uint16 {
if !f.client.Decorated() {
return 0
Expand Down
5 changes: 1 addition & 4 deletions wm/screens.go
Expand Up @@ -131,10 +131,7 @@ func (xsp *x11ScreensProvider) RefreshScreens() {
fyne.LogError("Configure Window Error", err)
}
for _, c := range xsp.x.Windows() {
f := c.(*client).frame

c.(*client).setWindowGeometry(f.x, f.y, c.(*client).frame.width, c.(*client).frame.height)
c.(*client).frame.applyTheme(true)
c.(*client).frame.updateScale()
}
}

Expand Down

0 comments on commit 2941fe8

Please sign in to comment.