[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Making a modal window



Hi,

On Sun, 09 Dec 2018 18:03:53 +0000
"J.Arun Mani" <J.ArunMani@protonmail.com> wrote:

> Hello,
> [I'M UNSURE WHETHER IT IS THE RIGHT PLACE TO ASK THIS QUESTION. IF NOT
> PLEASE GUIDE ME TO THE RIGHT PLACE] I'm making a project(using Python3)
> which opens whenever someone opens their computer (assume Linux-Debain
> based) and asks them some details. The user should not be allowed to
> use the computer without giving the details. The project is based on
> GTK3 and is for Debian based OS. I need help in the following- How can
> I make the application modal? That is, make sure that the user cannot
> access any thing in desktop without giving the details (the application
> is a compulsory one, thus one should not be able to close or minimise
> it).
> 
> I researched on this a bit and found the answers leading to Desktop
> Managers. But I'm stuck how to start with them. So need some help here.

you might want to have a look at

https://developer.gnome.org/pygtk/stable/gdk-functions.html

The gtk.gdk.pointer_grab(), gtk.gdk.pointer_ungrab(),
gtk.gdk.keyboard_grab() and gtk.gdk.keyboard_ungrab() functions might be
able to do what you want.

Regards

Michael


Reply to: