Style for sticky windows?

Problems with decorations or key/mouse bindings? Or perhaps you have a cool mouse/key binding you want to share.
thomasadam
Administrator
Administrator
Posts: 3043
Joined: Mon Nov 08, 2004 1:12 am
Location: England
Contact:

Re: Style for sticky windows?

Postby thomasadam » Wed Nov 16, 2005 4:14 pm

77nafets wrote:Hi there!

I'd like to give sticky windows a different style than the others. I.e., writing something like:


You want FvwmEvent for this:

Code: Select all

DestroyFunc FvwmToggleStickyPixmap
AddToFunc   FvwmToggleStickyPixmap
+ I ThisWindow (sticky)  WindowStyle UseDecor StickyDecor
+ I ThisWindow (!sticky) WindowStyle UseDecor NormalDecor


This function changes a window's decor depending on whether it is stick or not --- so you'll have to ensure you use two separate decors if you decide this is how you want to do it. Here's the event(s):

Code: Select all

DestroyModuleConfig FvwmEvent-Sticky: *
*FvwmEvent-Sticky: PassId
*FvwmEvent-Sticky: Delay 1
*FvwmEvent-Sticky: configure_window FvwmToggleStickyPixmap
*FvwmEvent-Sticky: focus_change     FvwmToggleStickyPixmap
*FvwmEvent-Sticky: add_window       FvwmToggleStickyPixmap

AddToFunc StartFunction Module FvwmEvent FvwmEvent-Sticky


77nafets wrote:I disabled the lines in the title bar of sticky windows by giving them the same hi/sh colors as the title bar background. Is there a more clean way?


Yes. I patched it ages ago:

http://edulinux.homeunix.org/fvwm/patches.html

-- Thomas Adam

graham
Kitten
Kitten
Posts: 7
Joined: Fri Nov 11, 2011 6:26 pm

Re: Style for sticky windows?

Postby graham » Sat Mar 01, 2014 5:50 pm

This old thread describes a mechanism for exactly what I want to do (a bespoke style for sticky windows, in my case using WindowStyle BorderColorset... rather than a decor).
However, two of the FvwmEvents appear to cause fvwm/X to thrash (50%+ cpu)

configure_window - a constant stream of events for each of stalonetray & gkrellm (not xterm, emacs,..)
focus_change - a constant stream of events for the currently/most recently focused window

So ... is the event mapping above still correct and expected to work in fvwm 2.6.5 or have I made a mistake somewhere, or possibly elsewhere in my config?


rgds all,
g.

graham
Kitten
Kitten
Posts: 7
Joined: Fri Nov 11, 2011 6:26 pm

Re: Style for sticky windows?

Postby graham » Tue Mar 04, 2014 9:31 pm

Duh!

Of course, the WindowStyle command caused a new configure_window event, and thus an endless cycle.

Code: Select all

*FvwmEvent-Sticky: Delay 1

which I had somehow missed in the original code sample, solved it.

g.


Return to “Decorations and bindings”

Who is online

Users browsing this forum: No registered users and 1 guest