| Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date | |
| All threads index page 2 | |
Hello, We have a fullscreen Qt application (that must be borderless) that needs mouse and keyboard. We want to disable the window manager from interacting, so that pressing ALT+F4 will not close the window. The window manager is mwm. First, we tried Qt::FramelessWindowHint. The window had no border, but using ALT+F4 was not disabled. Then, we tried to use Qt::X11BypassWindowManagerHint. It mostly works since we do not have the border. But we lost the keyboard focus (for example, pressing ALT+F7 *grabs* a window that is behind our application's window). Any idea what's wrong in our approach? -- [ signature omitted ]
On Friday 09 May 2008 19:13:37 Pierre-Ãtienne Messier wrote: > Any idea what's wrong in our approach? You need to configure your window manager to run in kiosk mode, not your application. kde, twm and xfce can do that. -- [ signature omitted ]
Hello!
If the only thing you want to do is to prevent the ALT+F4 from closing your
program, you can reimplement of your top-level widgets in this way:
void QWidget::closeEvent( QCloseEvent * event )
{
event->ignore();
}
This way you just ignore the pressure on the "X" button of your window, the
ALT+F4 pressure or selecting "Close" from the window menu ;-)
Have fun,
Enrico Ros
On Friday 09 May 2008 19:13:37 Pierre-Étienne Messier wrote:
> Hello,
>
> We have a fullscreen Qt application (that must be borderless) that needs
> mouse and keyboard. We want to disable the window manager from interacting,
> so that pressing ALT+F4 will not close the window. The window manager is
> mwm.
>
> First, we tried Qt::FramelessWindowHint. The window had no border, but
> using ALT+F4 was not disabled.
>
> Then, we tried to use Qt::X11BypassWindowManagerHint. It mostly works since
> we do not have the border. But we lost the keyboard focus (for example,
> pressing ALT+F7 *grabs* a window that is behind our application's window).
>
> Any idea what's wrong in our approach?
--
Email.it, the professional e-mail, gratis per te: http://www.email.it/f
Sponsor:
GIOCA E VINCI TUTTI I GIORNI!
* Gioca e vinci buoni sconto da 50? per soggiorni Best Western nel mondo. In più partecipi all?estrazione di una C1!
Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?midx04&d-5
--
[ signature omitted ]