Skip to content

Commit

Permalink
#1111: ensure we remove the current backing before adding a new one
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@13291 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Aug 10, 2016
1 parent 44c67a9 commit 2b88874
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions src/xpra/client/gl/gtk2/gl_client_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,28 +69,31 @@ def do_configure_event(self, event):
self._backing.paint_screen = True

def destroy(self):
self.remove_backing()
GTK2WindowBase.destroy(self)

def remove_backing(self):
b = self._backing
if b:
self._backing = None
b.paint_screen = False
b.close()
self._backing = None
GTK2WindowBase.destroy(self)

glarea = b._backing
if glarea:
try:
self.remove(glarea)
except:
pass

def new_backing(self, bw, bh):
self.remove_backing()
widget = GTK2WindowBase.new_backing(self, bw, bh)
log("new_backing(%s, %s)=%s", bw, bh, widget)
self.add(widget)


def freeze(self):
b = self._backing
if b:
glarea = b._backing
if glarea:
self.remove(glarea)
b.close()
self._backing = None
self.remove_backing()
GTK2WindowBase.freeze(self)


Expand Down

0 comments on commit 2b88874

Please sign in to comment.