Tk Source Code

View Ticket
Login
Ticket UUID: 553926
Title: wm style stayontop, et al, patch
Type: Patch Version: None
Submitter: ericm Created on: 2002-05-08 22:31:16
Subsystem: 68. Win Window Operations Assigned To: hobbs
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2002-07-16 12:13:01
Resolution: Fixed Closed By: hobbs
    Closed on: 2002-07-16 05:13:01
Description:
I couldn't find this patch anywhere on the Tk SF site. 
It may already
be in someplace.  This patch provides a "wm style"
command on Windows to give access to various extended
Windows window attributes, such as "stay on top" and
transparency.  The author, Jay Schmidgall, sent it to
me some time ago with the following message:

------------------------------------------------

The next big style option under WinXX would probably be
to add support for icons in the status area or system
tray. However, there's much more to it than just a few
options, e.g., you would need to be able to set up
bindings and all that to handle button clicks, give it
an icon to put in the tray, etc.

The syntax is as follows:

    wm style window ?style? ?boolean?

  where ?style? is one of: 

    caption, dialog, maximize, minimize, stayontop,
style,
    taskbar, transparent

  If ?boolean? is omitted, the current setting of
?style? is returned.

Notes (or Bugs, if you prefer):

When toggling the taskbar style, if the window is
mapped, the window must first be withdrawn and then the
style changed. Toggling the style without first
withdrawing the window will have no effect on the
window's presence in the taskbar, even if the window is
later withdrawn and deiconified.

Making multiple windows stayontop results in those
windows being on top of all other windows, but
maintaining a stacking order between themselves; there
is no churn going on.

Changing styles causes interactions in varying ways.
For instance,
setting either just the minimize or maximize style
false simply
disables that button. Setting them both, however,
causes both buttons to be removed from the title bar.

Removing a window from the task bar causes its minimize
and maximize buttons to be removed, as well as its
system menu, though the close box remains.

Removing a windows's system menu causes removal of the
minimize,
maximize and close buttons.

Removing the caption results in a window much like one
with
overrideredirect on, but the window remains resizable
In addition,
the space taken up by the caption becomes available to
the window.

------------------------------------------------
User Comments: hobbs added on 2002-07-16 12:13:01:
Logged In: YES 
user_id=72656

Subsumed by 'wm attributes' command in 8.4b1.

hobbs added on 2002-05-31 10:41:41:

File Added - 24120: winwmattr.patch

Logged In: YES 
user_id=72656

Attached is an alternative style of making these mods that is 
more "correct" in that it updates the wrapper.  It can merge in 
the other styles that are desired.

mdejong added on 2002-05-29 05:41:45:
Logged In: YES 
user_id=90858

This certainly looks like an interesting patch. How would
a style differ from a state? It seems like we already have
states like zoomed, why not add this functionality there?
I think the "on top" state would be very useful since folks
are always asking how to implement this or using transients
in evil ways the get it done.

hobbs added on 2002-05-09 05:40:57:
Logged In: YES 
user_id=72656

I already have a modified version of this which handles 
TOPMOST plus a few other behaviors (will have to merge 
these ideas).  I had placed it in 'wm configure', but I 
realize that 'wm attributes', like 'file attributes' is the 
perfect place for it.  A TIP will be needed.

ericm added on 2002-05-09 05:31:17:

File Added - 22741: wmstyle.diff

Attachments: