Bug 384 - Active all the time
Status:
RESOLVED FIXED
Component:
Core :: UNIX
Version:
1.6.1
Hardware:
All Linux
Importance:
P2 critical
Target Milestone:
---
Assignee:
Rob Caelers
URL:
Depends on:
Blocks:
Reported:
Apr 29 2004 15:41:38 UTC
by:
Pawel Kolodziej
Modified:
Aug 19 2004 11:39:48 UTC
CC List:
Prakash Advani
Johannes Rohr
Jeffrey W. Baker
WhoWhenWhatRemovedAdded
Johannes RohrJun 23 2004 13:25:29 UTCccj.**@co**.org
Rob CaelersJun 24 2004 05:16:36 UTCseveritynormalcritical
statusNEWASSIGNED
platformPCAll
versioncvs1.6.1
Rob CaelersJul 1 2004 12:09:34 UTCstatusASSIGNEDRESOLVED
resolutionFIXED
Rob CaelersAug 19 2004 11:39:42 UTCccPrakash Advani
Jeffrey W. BakerAug 19 2004 11:39:48 UTCccJeffrey W. Baker
Description
Pawel Kolodziej  Apr 29 2004 15:41:38 UTC
Workrave 1.6.0 (todays nightbuild) thinks that I'm active all the time.
After some investigation i noticed that it recognize that button was 
pressed but does not that it was released. 
In file X11InputMonitor.cc in main loop I've added small printf and when I
press button event 4 (ButtonPressed) is generated. But when I release
button no event is generated. I changed mask in XGrabButton call from
ButtonPressMask to ButtonPressMask| ButtonReleaseMask but this has not
hellped. I have XFree86-4.4.0
Comment 1
Pawel Kolodziej  Apr 29 2004 15:43:26 UTC
And when i run 'xev' I see that both ButtonPressed and ButtonReleased events are
generated
Comment 2
Rob Caelers  May 13 2004 10:12:11 UTC
Please check if the record extension is enabled in /etc/X11/XF86Config-4:

Section "Module"
        Load    "record"
EndSection

Workrave does not monitor the release event. Each keypress is an activity. As
longs as you keep pressing keys (or keep moving your mouse), workrave assume you
are active. activity does not end by releasing the mouse button.

Are you running some video player that artificially create keyboard button
events to "disable" the screensaver? I have seen such a player (forgot which one)
Comment 3
Pawel Kolodziej  May 15 2004 16:29:59 UTC
I was talking about BUTTON (mouse button) not key from keyboard. I had no "load
record" but i've added it and workrave still does no work correctly.
Comment 4
Johannes Rohr  Jun 23 2004 13:25:43 UTC
*** Bug 403 has been marked as a duplicate of this bug. ***
Comment 5
Andrew J. Montalenti  Jun 23 2004 20:42:44 UTC
Hey there,

I posted a report to Debian BTS about this which got forwarded here (actually,
to the dupe mentioned above).  As a workaround I downgraded from the package in
sid (1.6.1-2) to the package in sarge (1.4.1-1).  This older package does not
suffer from the bug described here.

Not sure if this has to do with Gnome 2.6 (which only recently was put in sid)
or what, but I'd be glad to provide any information necessary to squash it.

-Andrew
Comment 6
Rob Caelers  Jun 24 2004 05:16:37 UTC
I've never seen this bug myself, so I'm really puzzled.

A few questions.
- Do all breaks ignore activity?
- Is 'suspend when inactive' enabled for all breaks?
- Is networking enabled? (Does the debian package have networking support?)
- Does workrave show a break window after removing the warning window.
- What happens when a break window appears? Does the break count-down or does
the time remain the same all the time ?
- After starting workrave, do the timers start immediately, or do they start
when you first become active?
- Do the timers keep running indefinately

Could you mail me (or attach to bugzilla) the output of:

gconftool-2 --dump /apps/workrave

(You may want to remove your networking password from the output)

and the content of ~/.workrave

(I'm interested in 'state' and 'idlelog*' files. These files contain information
on your computer usage. You may not want to make them public by attachting them
to bugzilla)

This might help debugging a lot. Thanks.
Comment 7
Rob Caelers  Jul 1 2004 12:09:34 UTC
I hope this bug is now fixed.... Pawel's analysis was very accurate.
Unfortunately, I didn't understand it at first....

I thought workrave didn't need the 'button released' event. Only button presses
are counted as activity. However, the fix for bug #335 requires button release
events....Xrecord should deliver these events [so here is an inconsistency with
Pawel's comment that enabling xrecord didn't help]. However, when xrecord is not
available or fails, workrave falls back to a dirty hack to monitor keyboard and
mouse. This hack uses the grabbutton (which only grab presses) which does not
detect mouse release events.....

It is very likely that this hack will be removed in a future version of workrave
(>= 1.7)

Everone, please download a nightly build of Jul 2nd or later
(http://workrave.org/download/snapshots/20040702/) and confirm that this bug has
been fixed.
Comment 8
Rob Caelers  Aug 19 2004 11:39:48 UTC
*** Bug 421 has been marked as a duplicate of this bug. ***