Skip to content

Commit

Permalink
#1656: when we are forced to resize, make sure we reset the offsets a…
Browse files Browse the repository at this point in the history
…nd repaint the window

git-svn-id: https://xpra.org/svn/Xpra/trunk@17150 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Oct 10, 2017
1 parent c6a1788 commit aa52beb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/xpra/client/gtk_base/gtk_client_window_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1237,9 +1237,12 @@ def resize(self, w, h, resize_counter=0):
geomlog("resize(%s, %s, %s) current size=%s, fullscreen=%s", w, h, resize_counter, (ww, wh), self._fullscreen)
self._resize_counter = resize_counter
if (w, h)==(ww, wh):
self._backing.offsets = 0, 0, 0, 0
self.queue_draw(0, 0, w, h)
return
if not self._fullscreen and not self._maximized:
gtk.Window.resize(self, w, h)
self._backing.offsets = 0, 0, 0, 0
else:
#align in the middle:
ox = (ww-w)//2
Expand All @@ -1250,8 +1253,8 @@ def resize(self, w, h, resize_counter=0):
self._backing.offsets = ox, oy, ox, oy
#adjust pointer coordinates:
self.window_offset = ox, oy
self.queue_draw(0, 0, ww, wh)
self._set_backing_size(w, h)
self.queue_draw(0, 0, ww, wh)

def move_resize(self, x, y, w, h, resize_counter=0):
geomlog("window %i move_resize%s", self._id, (x, y, w, h, resize_counter))
Expand Down

0 comments on commit aa52beb

Please sign in to comment.