Re: A problem with gtk+ apps



On Tue, Aug 15, 2000 at 09:05:56PM -0700, Rich Shepard wrote:
>   There's an interesting annoyance with all apps that use gtk+ for the UI:
> they prevent the window manager from complying with the -geometry option on
> the command line that invokes the app.

I.e., if you have your application check for a "-geometry" option and
parse it, and use those values to request a main window size and
position, that doesn't work?

If your application *isn't* doing that, then the window manager doesn't
*know* about the "-geometry" option; "gtk_main()" doesn't recognize
"-geometry", so a GTK+ application won't *automatically* support
"-geometry" - you have to put code into your application to recognize
it.

>   It would be very nice to have gtk apps honor that command line option as
> other apps do.

It would, I suspect, be something done in:

	"_gdk_windowing_init_check()", which would have to parse the
	geometry specification, saving an indication of whether the
	position was specified and an indication of whether the size was
	specified, as well as saving the specified values;

	"gdk_window_new()", so that on top-level windows, the appropriate
	hints will be set (perhaps in "gdk_window_new()", with
	USPosition and/or USSize set if the appropriate item was
	specified in the geometry) - or maybe this can also be done in
	"_gdk_windowing_init_check()" in the "XmbSetWMProperties()"
	call;

and perhaps also done in the non-X11 versions (or hoisted up into
"gdk_init_check()") depending on whether the argument is to be
considered X11-specific or not.

(The above refers to the GTK+ CVS tree as of when I last updated it,
i.e. it applies to the current main branch rather than to the 1.2[.x]
GTK+ - the change is unlikely to show up in 1.2[.x].)

> Is this a reasonable request to the developers?

I'll leave that question up to the GTK+ developers to answer.





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