Skip to content

Commit

Permalink
remove erroneous double-guard: we already set the fullscreen flag bef…
Browse files Browse the repository at this point in the history
…ore calling set_fullscreen, so this would never do anything!

git-svn-id: https://xpra.org/svn/Xpra/trunk@8657 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Feb 13, 2015
1 parent 840240d commit f619889
Showing 1 changed file with 15 additions and 16 deletions.
31 changes: 15 additions & 16 deletions src/xpra/client/gtk_base/gtk_client_window_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,22 +347,21 @@ def set_shaded(self, shaded):


def set_fullscreen(self, fullscreen):
if self._fullscreen is None or self._fullscreen!=fullscreen:
#note: the "_fullscreen" flag is updated by the window-state-event, not here
statelog("%s.set_fullscreen(%s)", self, fullscreen)
if fullscreen:
#we may need to temporarily remove the max-window-size restrictions
#to be able to honour the fullscreen request:
w, h = self.max_window_size
if w>0 and h>0:
self.set_size_constraints(self.size_constraints, (0, 0))
self.fullscreen()
else:
self.unfullscreen()
#re-apply size restrictions:
w, h = self.max_window_size
if w>0 and h>0:
self.set_size_constraints(self.size_constraints, self.max_window_size)
#note: the "_fullscreen" flag is updated by the window-state-event, not here
statelog("%s.set_fullscreen(%s)", self, fullscreen)
if fullscreen:
#we may need to temporarily remove the max-window-size restrictions
#to be able to honour the fullscreen request:
w, h = self.max_window_size
if w>0 and h>0:
self.set_size_constraints(self.size_constraints, (0, 0))
self.fullscreen()
else:
self.unfullscreen()
#re-apply size restrictions:
w, h = self.max_window_size
if w>0 and h>0:
self.set_size_constraints(self.size_constraints, self.max_window_size)

def set_xid(self, xid):
if HAS_X11_BINDINGS and self.is_realized():
Expand Down

0 comments on commit f619889

Please sign in to comment.