wm state and maximizing a window 
Author Message
 wm state and maximizing a window

wm state window ?newstate?
newstate con be:normal, iconic,withdrawn, icon, or (Windows only)
zoomed.
This means that i can't maximize a window in this way of course.
What is the best way to maximize a window by tcl?
Thank you.
Stefano Porrino

--
Posted from ip73.netline96.it [194.244.34.73]
via Mailgate.ORG Server - http://www.*-*-*.com/



Sat, 06 Dec 2003 14:14:04 GMT  
 wm state and maximizing a window

Quote:

> wm state window ?newstate?
> newstate con be:normal, iconic,withdrawn, icon, or (Windows only)
> zoomed.
> This means that i can't maximize a window in this way of course.
> What is the best way to maximize a window by tcl?

Well, do you use Windows or not? On Windows, the "zoomed" state
corresponds to maximized.

Christian



Sat, 06 Dec 2003 14:25:07 GMT  
 wm state and maximizing a window

Quote:
> Well, do you use Windows or not? On Windows, the "zoomed" state
> corresponds to maximized.

> Christian

I use Linux


Sat, 06 Dec 2003 19:33:08 GMT  
 wm state and maximizing a window

Quote:
> Well, do you use Windows or not? On Windows, the "zoomed" state
> corresponds to maximized.

> Christian

I use Linux


Sat, 06 Dec 2003 19:35:13 GMT  
 wm state and maximizing a window

Quote:

>> Well, do you use Windows or not? On Windows, the "zoomed" state
>> corresponds to maximized.

>> Christian

>I use Linux

Look for "maximize" in <URL: http://mini.net/tcl/534.html >;
does that help?
--


Business:  http://www.Phaseit.net
Personal:  http://starbase.neosoft.com/~claird/home.html



Sun, 07 Dec 2003 00:27:45 GMT  
 wm state and maximizing a window

Quote:

> wm state window ?newstate?
> newstate con be:normal, iconic,withdrawn, icon, or (Windows only)
> zoomed.
> This means that i can't maximize a window in this way of course.
> What is the best way to maximize a window by tcl?

The reason 'zoomed' isn't available on Unix is because it is
not a standard state provided by X.  On Unix, you have to ask
for the screen width/height and set the geometry accordingly.

--
  Jeff Hobbs                     The Tcl Guy
  Senior Developer               http://www.ActiveState.com/
        Tcl Support and Productivity Solutions



Sun, 07 Dec 2003 04:00:42 GMT  
 wm state and maximizing a window

Quote:

> > wm state window ?newstate?
> > newstate con be:normal, iconic,withdrawn, icon, or (Windows only)
> > zoomed.
> > This means that i can't maximize a window in this way of course.
> > What is the best way to maximize a window by tcl?

> The reason 'zoomed' isn't available on Unix is because it is
> not a standard state provided by X.  On Unix, you have to ask
> for the screen width/height and set the geometry accordingly.

is there a reason why tk can't do this for us? It may not be perfect, but at
least it's (arguably) better than saying "zoomed doesn't work on unix". The
documentation could simply read " because X doesn't support the notion of
zoomed windows, a zoomed window on unix will take on the proportions of the
physical screen size. "


Sun, 07 Dec 2003 05:13:23 GMT  
 wm state and maximizing a window

Quote:




> > > wm state window ?newstate?
> > > newstate con be:normal, iconic,withdrawn, icon, or (Windows only)
> > > zoomed.
> > > This means that i can't maximize a window in this way of course.
> > > What is the best way to maximize a window by tcl?

> > The reason 'zoomed' isn't available on Unix is because it is
> > not a standard state provided by X.  On Unix, you have to ask
> > for the screen width/height and set the geometry accordingly.

> is there a reason why tk can't do this for us? It may not be perfect, but at
> least it's (arguably) better than saying "zoomed doesn't work on unix". The
> documentation could simply read " because X doesn't support the notion of
> zoomed windows, a zoomed window on unix will take on the proportions of the
> physical screen size. "

No, because then you'll get guys from the various wm camps
that say setting to screen size isn't correct.  For example,
if you hit the maximize button in sawfish (the one that the
wm controls), it won't display over the sawfish control bar.
Other wms have similar characteristics - but each has their
own way of determining it, in a way that does make it easy
for us to be wm-independent.

--
  Jeff Hobbs                     The Tcl Guy
  Senior Developer               http://www.ActiveState.com/
        Tcl Support and Productivity Solutions



Sun, 07 Dec 2003 06:33:45 GMT  
 wm state and maximizing a window

Quote:

> No, because then you'll get guys from the various wm camps
> that say setting to screen size isn't correct.  For example,
> if you hit the maximize button in sawfish (the one that the
> wm controls), it won't display over the sawfish control bar.

Dang! If only we had a scripting language so we could customize this ....
hey, wait a minute! Tcl *is* a scripting language :-)

How about coding it with the following behavior:

The wm state zoom code looks for a function named tk_zoom_<window manager>
(eg: tk_zoom_sawfish, tk_zoom_fvwm, etc (or pick a better naming scheme)).
If found, it is expected to return the coordinates for a zoomed window. In
the absence of this function, either a) do what zoom does now on windows,
b) zoom to the physical size of the screen minus the menubar for macintosh,
or c) zoom to the physical dimensions of the display (or perhaps call
tk_zoom_generic).

That way we can write little special-case scripts for various known window
managers. Plus, programmers can override the behavior if they find
themselves in a unique or new window manager. To do this right, though, we
might need some additional wm hooks to be able to query the current window
manager state (eg: name of window manager, whether it has protected regios
like menubars or task bars, etc.). That might be the hard part. And it might
be impossible, considering how customizable window managers are these days.
I'm a bit out of the loop in this regard, having been stuck with MS Windows
for the past five years or so. Ugh.

The advantage, of course, is we remove one bit of platform dependence (ie:
"wm state . zoom" works on all platforms). I don't like having features that
only work on one platform if it can be avoided, and this sure looks
avoidable.

I'd even volunteer for writing the window manager specific bits, except for
the fact right now I don't have access to *nix (but that can be rectified
fairly easily).



Sun, 07 Dec 2003 06:56:01 GMT  
 wm state and maximizing a window

Quote:



>>No, because then you'll get guys from the various wm camps
>>that say setting to screen size isn't correct.  For example,
>>if you hit the maximize button in sawfish (the one that the
>>wm controls), it won't display over the sawfish control bar.

> Dang! If only we had a scripting language so we could customize this ....
> hey, wait a minute! Tcl *is* a scripting language :-)

> How about coding it with the following behavior:

[making some small wm dependant scripts]

a very good idea!

And what about the new discussion about enhancing the ICCCM
protocol?  I haven't find any pointer.  But isn't this intended
to add this sort of requests?  Anyone from the kde or gnome
fraction?

Uwe

--
voiceINTERconnect www.voiceinterconnect.de
... smart speech applications from germany



Sun, 07 Dec 2003 16:03:22 GMT  
 wm state and maximizing a window

Quote:


>> Dang! If only we had a scripting language so we could customize this ....
>> hey, wait a minute! Tcl *is* a scripting language :-)

>> How about coding it with the following behavior:

> [making some small wm dependant scripts]

> a very good idea!

I disagree, particularly as it would require a mechanism for directly
manipulating window properties (a feature so outrageously unsafe and
easy to misuse that Tk doesn't support it at all.)  I also don't even
want to think about maintaining such a mess...

Quote:
> And what about the new discussion about enhancing the ICCCM
> protocol?  I haven't find any pointer.  But isn't this intended
> to add this sort of requests?  Anyone from the kde or gnome
> fraction?

There's plenty of room to add a zoomed/maximised state to the ICCCM
but standardising it is harder, and getting all the WMs to support
the state (which is critical to real acceptance) is hardest of all.

Those people reading the appropriate X header file will notice that
there is a space already for this sort of thing; I conjecture that
it was present in earlier versions but got taken out because 90% of
the effect could be done with just setting the window geometry...

Donal.
--

-- He has the intelligence of a small mollusc and the practical experience of



Sun, 07 Dec 2003 18:26:49 GMT  
 
 [ 12 post ] 

 Relevant Pages 

1. wm state vs. wm geometry

2. wm maximize .

3. WM Maximize/Minimize notification?

4. window manager deathmatch: wm geometry vs. wm maxsize

5. wm state

6. Newbie unable to kill window after Maximizing window.

7. Window Handle / Maximize dos window ???

8. maximizing windows in motif and windows

9. On Windows, don't use a maximize box if the Windows is not resizable

10. How to: something like "wm state maximized"

11. how maximize records display in maximized BrowseBox/Listbox

12. Detecting a Maximized Window or How do I save my Window State?

 

 
Powered by phpBB® Forum Software