GNOME Bugzilla – Bug 320091
disable_quit lockdown works partly
Last modified: 2006-08-07 20:51:27 UTC
The disable_quit lockdown property works fine for ctrl-w and the close/quit menu entry. However, it does not work when clicking the window manager's close button (the X in the corner).
Vincent, what are applications supposed to do in that particular case?
Err. I don't know :-) But I agree that it sounds weird to be able to close the app with the window manager. Maybe there should be an hint to tell the window manager to not show/disable this button for some windows? cc'ing Elijah. Maybe he'll have an idea about this.
The WM merely sends a request to the app to close itself (WM_DELETE_WINDOW); it's not uncommon for apps to handle these requests by throwing up an are-you-sure dialog or something similar. So, you could just have the app ignore such requests altogether. Admittedly, it's just a short term workaround because having inoperative buttons is kinda tacky... Longer term, there's a feature request currently for allowing certain types of windows to not have close buttons, which could be extended slightly to cover what you want. Havoc points out in the bug that there are some MWM hints that could be used for this for now, though we'd probably need an EWMH extension meaning we'd have to get this hammered out on wm-spec-list. Anyway see bug 319723 for more details (though not much) on that end.
This bug makes Epiphany unsuitable for kiosk-mode. Of course fullscreen can also be forced, but then it's still possible to close the window with Alt-F4.
Should be easy to add a check into ephy-window's delete event handler for this.
Created attachment 69020 [details] [review] Adds an if in ephy_window_delete_event This adds: if (eel_gconf_get_boolean("/apps/epiphany/lockdown/disable_quit")) { return TRUE; } To ephy_window_delete_event(), so it just does nothing when the lockdown is set.
Thanks for the patch! It's fine, except that you used spaces instead of tabs for indentation.
Fixed in the development version. The fix will be available in the next major release. Thank you for your bug report.