Subject: FvwmIconMan*iconbutton option

From: Chris Rankin <[email-masked]>
Date: Thu, 2 Dec 1999 22:57:23 +1100 (EST)

I noticed this yesterday when I was trying out the latest CVS
(2.3.11). Firstly, there seems to be an undocumented extra button
style FvwmIconMan*iconbutton, with a default value of
"flat". (Explicitly setting the value to "up" works fine.) What I see
is:

(a) Iconify a window that (according to the Icon Manager) does not
    have keyboard focus. The Icon-Manager initially draws the button
    in the up-style, although it is redrawn correctly when you pass
    the mouse over it.
(b) Select (but do not deiconify) an icon: the icon's Icon-Manager
    button is drawn in the "up" style. This style-error is *not*
    corrected by passing the mouse pointer over the button.

On a possibly related note, I also see that the Icon Manager loses
track of which window currently has the keyboard focus if you transfer
focus to another window by clicking on the title-bar or border
decorations instead of the window itself.

Does anyone have a head-start on solving these bugs?
Cheers,
Chris.
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Brad Giaccio <[email-masked]>
Date: Thu, 2 Dec 1999 08:48:08 -0500

> "flat". (Explicitly setting the value to "up" works fine.) What I see

What do you mean undocumented, its listed in the man page and the NEWS
file?  

>     in the up-style, although it is redrawn correctly when you pass

I've checked in but here is the diff for problem a
===================================================================
RCS file: /home/cvs/fvwm/fvwm/modules/FvwmIconMan/xmanager.c,v
retrieving revision 1.31
diff -u -b -B -r1.31 xmanager.c
--- xmanager.c  1999/12/01 13:29:18     1.31
+++ xmanager.c  1999/12/02 13:46:31
@@ -1321,6 +1321,8 @@
        ConsoleDebug (X11, "\tIcon changed\n");
        b->drawn_state.iconified = win->iconified;
        draw_icon = 1;
+       draw_background = 1;
+       draw_string = 1;
       }
       if (dirty & STRING_CHANGED) {
        ConsoleDebug (X11, "\tString changed: %s\n", win->display_string);
===================================================================

I'm not sure I understand b so if this fixes that good, otherwise send
me your config for FvwmIconMan and your focus policy stuff.  I'm going
to need that anyway for the last problem anyway.

Brad 

-- 
--- There are two kinds of knowledge, you either know the answer or
			you know where to find it
		      -Kane, Johnson, and anonymous
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Chris Rankin <[email-masked]>
Date: Fri, 3 Dec 1999 08:21:53 +1100 (EST)

> What do you mean undocumented, its listed in the man page and the NEWS

Well, I grepped through my installed man page for FvwmIconMan for
iconbutton and found nothing. Maybe I've got an old version of this
page cached somewhere?

> I've checked in but here is the diff for problem a
Fixed.

> to need that anyway for the last problem anyway.

Problem (b) is not fixed by the above diff. All I'm doing here is
single-clicking on desktop icons. When I do this, the Icon Manager
button is drawn in the "up" style ... and I think I understand: the
button is suddenly drawn in "focusbutton" style instead of
"iconbutton" style, although it's still an icon button. Maybe we need
new styles "iconfocusbutton" and "iconselectfocusbutton" to clarify
the ambiguous cases?

Anyway: from my .fvwm2rc file:
Style "*"           BorderWidth 5, HandleWidth 5
Style "*"           Icon unknown1.xpm, Color dimgrey/lightgrey
Style "*"           MWMFunctions, MWMDecor, MWMButtons, HintOverride
Style "*"           DecorateTransient, NoPPosition
Style "*"           IconBox 750 -500 1000 -200
Style "*"           ClickToFocus
Style "*"           ActivePlacement

*FvwmIconMan*numManagers 1
*FvwmIconMan*Resolution  page
*FvwmIconMan*background  #908090
*FvwmIconMan*foreground  black
*FvwmIconMan*font        7x13bold
*FvwmIconMan*format      "%t"
*FvwmIconMan*action      Mouse   1 N sendcommand Focus, sendcommand "Iconify"
*FvwmIconMan*action      Mouse   2 N sendcommand "Iconify 1"
*FvwmIconMan*action      Mouse   3 N sendcommand "FvwmIdent"
*FvwmIconMan*followfocus true
*FvwmIconMan*sort        none
*FvwmIconMan*plainbutton          up black #908090
*FvwmIconMan*iconbutton           flat black #908090
*FvwmIconMan*selectbutton         down black #d08090
*FvwmIconMan*focusbutton          up lightgray #b08090
*FvwmIconMan*focusandselectButton down lightgray #b08090
#*FvwmIconMan*dontshow icon=Untitled name=Untitled
#*FvwmIconMan*drawicons true
*FvwmIconMan*buttongeometry  140x0
*FvwmIconMan*managergeometry 1x9+0+0

Cheers,
Chris.

---

From: Brad Giaccio <[email-masked]>
Date: Fri, 3 Dec 1999 07:04:16 -0500

> new styles "iconfocusbutton" and "iconselectfocusbutton" to clarify

Well you are in fact focusing on the window when you select its icon,
so focusbutton would be the correct style to show here, I really didn't
want to have to right to more styles into the code.  So I think I'm
going to pole the workers list on a seperate thread to see what the
consesus is.

Brad

---

From: Chris Rankin <[email-masked]>
Date: Sat, 4 Dec 1999 11:56:42 +1100 (EST)

> ... So I think I'm

Actually, my suggestion isn't 100% serious here ;-). It's just that
different styles for different window states are fine provided that no
two of those states can happen at the same time. Here we have "focus",
"selected" and now "icon", any one of which may apply to a single button
at any given moment. That's 8 possibilities (well, 7 because
unfocussed, unselected and non-iconified is "plain"). Add another style
and suddenly there are 15 possibilities. This gets unmanageable very
quickly.

Chris.