root.overrideredirect() removes tkinter app from taskbar

55 views Asked by At

I have a clock app which when I make it fullscreen disappears from the taskbar and also makes the app inaccessible through Alt+Tab. It's apparently caused by root.overrideredirect(True) function which I use to fullscreen the app. Is there a way I can fullscreen the tkinter and keep in on the taskbar?

This is the code for fullscreen:

def toggleFullScreen(event):
    if fullScreen:
        deactivateFullscreen()
    else:
        activateFullscreen()

def activateFullscreen():
    global fullScreen, geometry
    fullScreen = True
    geometry = root.geometry()      # Store geometry for reset
    root.overrideredirect(True)     # Hides borders and make truly fullscreen
    root.state("zoomed")            # Maximize window, optionally set screen

def deactivateFullscreen():
    global fullScreen, geometry
    fullScreen = False
    root.state("normal")
    root.geometry(geometry)
    root.overrideredirect(False)
0

There are 0 answers