Re: fvwm burning CPU on Move-or-Raise, Resize-or-Lower functions

2012-06-07 Thread Thomas Adam
On Thu, Jun 07, 2012 at 01:13:04AM +0200, Axel Rohde wrote:
 Hi Thomas and fvwm-workers,
 
 attached is my .fvwm2rc with workarounds.
 
 In case you are not going to fix the root causes, 
 other users experiencing slow down, whistling graphics boards or 
 angry admins might find it useful.

Unfortunately that's not a solution, and won't work in a lot of cases.

I appreciate it's annoying for you.  The reason this won't change -- and why
I refuse to even do so -- is that it would require quite a large change to
fvwm/functions.c:execute_complex_function().  In essence, when FVWM sees
this:

AddToFunc foo M Resize

And that just happens to be on a window which has FixedSize set, then this
happens:

* Grab on pointer.
* (M) context found (assuming other (I) context have run first.)
* Action (Resize) run.
* Wait for button to be released -- with the server grabbed.
* FVWM locks.
* Button released.
* Function ended.

There is no check to know if by the time the Resize command has bailed due
to it not being able to operate on the window in question, that just because
the pointer is held down, there's nothing to do.  By design, FVWM is going
to wait for that button to come up -- it's what you asked with M or H in
the first place:

1113 type = CheckActionType(x, y, d, HaveHold, True, button);

-- Thomas Adam

-- 
Deep in my heart I wish I was wrong.  But deep in my heart I know I am
not. -- Morrissey (Girl Least Likely To -- off of Viva Hate.)



Re: fvwm burning CPU on Move-or-Raise, Resize-or-Lower functions

2012-06-06 Thread Thomas Adam
On Thu, May 31, 2012 at 07:49:24PM +0200, Axel Rohde wrote:
 Hi Thomas,
 
 on a SuSe system at work I found a system.fvwm2rc apparently authored by
 you. I appended those parts of my config that reproduce the issue on
 my PC at the end of the file.

So the CPU usage here is because we lock and wait, whilst the button is held
down, having grabbed the server, because whilst the curosr is down, the
cursor is changed, whilst we do nothing, because the resultant operation is
a no-op -- we're just waiting for WaitForButtonsUp() to complete all the
time.

So after *all* of that, and leading me all around the houses, all you needed
to have said originally was:

FixedSize/FixedPosition windows cause CPU to increase when a function is
run on such windows.  Here's the Styles and function I'm using.

Nevermind though.  :)

Nothing I want to do about this -- and nothing I can do about this, because
the pointer is grabbed throughout the lifetime of the function being run.

-- Thomas Adam