How can I deactivate mouse motion (<Motion-1>) on windows taskbar while I am dragging my frameless window? How can I deactivate mouse motion (<Motion-1>) on windows taskbar while I am dragging my frameless window? tkinter tkinter

How can I deactivate mouse motion (<Motion-1>) on windows taskbar while I am dragging my frameless window?


When you makes a window border-less using overrideredirect() method, then this method says to operating system's windows manager to just ignore your tkinter's GUI window.

When you do this then the windows manager now takes no any responsibility for your GUI window. Each and every task like window dragging, minimization and maximization, closing event etc should be handled by you manually.

Now to solve you dragging problem on windows taskbar there are two ways.

1) As I told you before that do everything manually, then you should to locate your windows taskbar manually and then modify your drag function to prevent your mouse motion after the borders of your taskbar.

2) The simplest way is to make your GUI window a top level window by which you will able to drag your window onto the taskbar without any window hiding problem.

To make the window top level you should just set an Attribute i.e. topmost = True.

    root.attributes('-topmost',1)