Re: maximize window

From: Date: Thu, 20 May 2004 17:20:18 +0000
Subject: Re: maximize window
References: 1 2  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-4527@lists.php.net to get a copy of this message
On Wed, 19 May 2004 17:44:47 +0300 Cosmin <cosminb@as.ro> wrote: > This only sets the default size. I want the window to be maximized not > have a default size. I now how to do that and how to get the screen > width. The problem is that the height of the taskbar can vary from one > OS to another Not only that. The user may have various taskbars and panels around, both vertical and horizontal. That's why the recent WM specs from freedesktop.org allow apps (such as taskbars, panels) to use a feature called "struts" which reserves portions of the visible screen for them. The window manager in turn will calculate the maximum available space for a maximized window by subtracting all the reserved space from the total screen estate. No need to do guesswork such as-30 px off the lower edge because they're worth next to nothing. Besides, isn't maximization of a window the window manager's job? I'm hardly an expert on the issue, but to me it seems more logical this way. A widget set such as GTK can at most ask for a default size for the window. The user may decide to maximize it, which is handled by the window manager, and IIRC it's also the WM's job to remember the size and position of the window for later runs. The best you can do is assign certain WM flags to the window. To answer your question directly, you can talk to the WM directly (hopefully nowadays most of them speak the same language as per FDO specs) and tell it to maximize the window. But I have no idea if it can be done from PHP. -- Ciprian Popovici

« previous php.gtk.general (#4527) next »