GNOME Bugzilla – Bug 315647
GdkWindowState should include fields for _NET_WM_STATE_MAXIMIZED_VERT and _NET_WM_STATE_MAXIMIZED_HORZ
Last modified: 2014-03-13 05:10:33 UTC
Please describe the problem: The AWT's Frame API supports MAXIMIZED_HORIZ and MAXIMIZED_VERT window states. I'd like to be able to support these states on the GTK peers. I tried getting these properties directly from the X window using XGetWindowProperty, within the window-state-event callback, but that produced crashes on some window managers (see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23558). Steps to reproduce: Actual results: Expected results: Does this happen every time? Other information:
I think there is no good application use case for these, and the AWT will have to deal with systems that don't support the concept anyways.
OK, is it possible to retrieve these hints (from Xlib directly) safely from within the window-state-event callback? The way I was doing it before seems is unsafe on some window managers: XGetWindowProperty (GDK_DISPLAY_XDISPLAY (display), GDK_WINDOW_XID (widget->window), gdk_x11_get_xatom_by_name_for_display (display, "_NET_WM_STATE"), 0, G_MAXLONG, False, XA_ATOM, &type, &format, &atom_count, &bytes_after, alu.gu_extents);
Metacity now supports horizontal and vertical maximisation, and remembering these states seems like perfectly sensible behaviour for an application. Any chance of reconsidering the "no good application use case"?
Without that, it's impossible to solve bug #650557, and the same bug that's going to be opened for other applications.
I consider this addressed with GDK_WINDOW_STATE_TILED