mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-05 00:02:29 -04:00
Move fullscreen logic to wm_map method
This commit is contained in:
parent
d0ca03a49a
commit
ba202f67c1
4 changed files with 8 additions and 7 deletions
|
@ -827,8 +827,8 @@ class Game(object):
|
|||
reset_solver_dialog()
|
||||
# unhide toplevel when we use a progress bar
|
||||
if not self.preview:
|
||||
wm_map(self.top, maximized=self.app.opt.wm_maximized)
|
||||
self.top.attributes('-fullscreen', self.app.opt.wm_fullscreen)
|
||||
wm_map(self.top, maximized=self.app.opt.wm_maximized,
|
||||
fullscreen=self.app.opt.wm_fullscreen)
|
||||
self.top.busyUpdate()
|
||||
if TOOLKIT == 'gtk':
|
||||
# FIXME
|
||||
|
@ -910,8 +910,8 @@ class Game(object):
|
|||
stats=self.app.stats.getStats(self.app.opt.player, self.id))
|
||||
if not self.preview:
|
||||
self.updateMenus()
|
||||
wm_map(self.top, maximized=self.app.opt.wm_maximized)
|
||||
self.top.attributes('-fullscreen', self.app.opt.wm_fullscreen)
|
||||
wm_map(self.top, maximized=self.app.opt.wm_maximized,
|
||||
fullscreen=self.app.opt.wm_fullscreen)
|
||||
self.setCursor(cursor=self.app.top_cursor)
|
||||
self.stats.update_time = time.time()
|
||||
self.busy = old_busy
|
||||
|
|
|
@ -46,7 +46,7 @@ def wm_withdraw(window):
|
|||
window.wm_withdraw()
|
||||
|
||||
|
||||
def wm_map(window, maximized=0):
|
||||
def wm_map(window, maximized=0, fullscreen=0):
|
||||
return
|
||||
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ def wm_deiconify(window):
|
|||
window.present()
|
||||
|
||||
|
||||
def wm_map(window, maximized=None):
|
||||
def wm_map(window, maximized=None, fullscreen=None):
|
||||
window.show()
|
||||
|
||||
|
||||
|
|
|
@ -43,12 +43,13 @@ def wm_deiconify(window):
|
|||
window.wm_deiconify()
|
||||
|
||||
|
||||
def wm_map(window, maximized=0):
|
||||
def wm_map(window, maximized=0, fullscreen=0):
|
||||
if window.wm_state() != "iconic":
|
||||
if maximized and WIN_SYSTEM == "win32":
|
||||
window.wm_state("zoomed")
|
||||
else:
|
||||
wm_deiconify(window)
|
||||
window.attributes('-fullscreen', fullscreen)
|
||||
|
||||
|
||||
__wm_get_geometry_re = re.compile(r"^(\d+)x(\d+)\+([\-]?\d+)\+([\-]?\d+)$")
|
||||
|
|
Loading…
Add table
Reference in a new issue