[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RP] Fwd: Bug#375157: ratpoison: bar show/hide apparant race condition -
From: |
Bernhard R. Link |
Subject: |
[RP] Fwd: Bug#375157: ratpoison: bar show/hide apparant race condition --- "stuck on" |
Date: |
Tue, 27 Jun 2006 10:09:21 +0200 |
User-agent: |
Mutt/1.5.9i |
----- Forwarded message from Chris Lesniewski-Laas <address@hidden> -----
From: Chris Lesniewski-Laas <address@hidden>
Reply-To: Chris Lesniewski-Laas <address@hidden>, address@hidden
Date: Mon, 26 Jun 2006 18:45:37 -0400
To: "Bernhard R. Link" <address@hidden>
Cc: address@hidden
Subject: Bug#375157: ratpoison: bar show/hide apparant race condition ---
"stuck on"
Resent-From: Chris Lesniewski-Laas <address@hidden>
Resent-To: address@hidden
Resent-CC: address@hidden (Bernhard R. Link)
Resent-Date: Mon, 26 Jun 2006 22:48:18 UTC
Resent-Message-ID: <address@hidden>
X-Debian-PR-Message: report 375157
X-Debian-PR-Package: ratpoison
X-Debian-PR-Keywords:
X-Debian-Pr-Source: ratpoison
Resent-Sender: Debian BTS <address@hidden>
Resent-Date: Mon, 26 Jun 2006 15:48:19 -0700
On Mon, Jun 26, 2006 at 10:29:19AM +0200, Bernhard R. Link wrote:
> And what clients are running? I could for example imagine such a
> behaviour if some X client switches focus back to itself whenever
> the bar window vanishes.
Thanks for the hint. Experimenting with various clients, I've been able to
reproduce the problem with xmms. Based on xtrace output, it seems that xmms
may be reacting to ratpoison's grabbing the input focus by sending a
PropertyNotify on its own window whether or not xmms's title changes. Since
ratpoison catches the PropertyNotify and reacts by calling update_window_names,
there's an infinite loop. This only seems to happen when the song playing in
xmms has certain titles --- I haven't figured out the pattern, although it may
be shorter titles that trigger it for some reason. It is possible that I was
seeing similar behavior with xterm because my shell setup changes the xterm
window's title to reflect the CWD.
Here is some xtrace output from tracing ratpoison through one of these loops.
I haven't yet traced xmms simultaneously.
000:<:494b: 4: Request(43): GetInputFocus
000:>:0x494b:32: Reply to GetInputFocus: revert-to=PointerRoot(0x01)
focus=0x01200022
000:<:494c: 4: Request(43): GetInputFocus
000:>:0x494c:32: Reply to GetInputFocus: revert-to=PointerRoot(0x01)
focus=0x01200022
000:<:494d: 4: Request(43): GetInputFocus
000:>:0x494d:32: Reply to GetInputFocus: revert-to=PointerRoot(0x01)
focus=0x01200022
000:<:494e: 4: Request(43): GetInputFocus
000:>:0x494e:32: Reply to GetInputFocus: revert-to=PointerRoot(0x01)
focus=0x01200022
000:>:494e: Event PropertyNotify(28) window=0x01e0001a atom=0x27("WM_NAME")
time=0x1259109e state=NewValue(0x00)
000:>:494e: Event PropertyNotify(28) window=0x01e0001a
atom=0x25("WM_ICON_NAME") time=0x1259109e state=NewValue(0x00)
000:>:494e: Event PropertyNotify(28) window=0x01e0001a
atom=0x24("WM_CLIENT_MACHINE") time=0x1259109e state=NewValue(0x00)
000:>:494e: Event PropertyNotify(28) window=0x01e0001a atom=0xe2(unrecognized
atom) time=0x1259109e state=NewValue(0x00)
000:<:494f: 24: Request(20): GetProperty delete=false(0x00) window=0x01e0001a
property=0x27("WM_NAME") type=0x1f("STRING") long-offset=0x00000000
long-length=0x00000064
000:>:0x494f:76: Reply to GetProperty: type=0x1f("STRING")
bytes-after=0x00000000 data='XMMS - 245. AudioBody - In The Now (5:04)'
000:<:4950: 24: Request(20): GetProperty delete=false(0x00) window=0x01e0001a
property=0x43("WM_CLASS") type=0x1f("STRING") long-offset=0x00000000
long-length=0x00002000
000:>:0x4950:52: Reply to GetProperty: type=0x1f("STRING")
bytes-after=0x00000000 data='XMMS_Player\000xmms\000'
000:<:4951: 24: Request(20): GetProperty delete=false(0x00) window=0x01e0001a
property=0x43("WM_CLASS") type=0x1f("STRING") long-offset=0x00000000
long-length=0x00002000
000:>:0x4951:52: Reply to GetProperty: type=0x1f("STRING")
bytes-after=0x00000000 data='XMMS_Player\000xmms\000'
000:<:4952: 28: Request(12): ConfigureWindow window=0x02600005 values={x=15
y=483 width=281 height=539}
000:<:4953: 16: Request(12): ConfigureWindow window=0x02600005
values={stack-mode=unknown:0x40}
000:<:4954: 16: Request(61): ClearArea exposures=false(0x00) window=0x02600005
x=0 y=0 width=0 height=0
000:<:4955: 4: Request(43): GetInputFocus
000:>:0x4955:32: Reply to GetInputFocus: revert-to=PointerRoot(0x01)
focus=0x01200022
000:<:4956: 64: Request(74): PolyText8 drawable=0x02600005 gc=0x0260000a x=4
y=16 texts={ delta=0 s='0-XMMS - 245. AudioBody - In The Now (5:04)'},{
s='\000'};
000:<:4957: 36: Request(74): PolyText8 drawable=0x02600005 gc=0x0260000a x=4
y=31 texts={ delta=0 s='1-XMMS Playlist'},{ s='\002'};
000:<:4958: 48: Request(74): PolyText8 drawable=0x02600005 gc=0x0260000a x=4
y=46 texts={ delta=0 s='2-Aiwa AV-D25 - Google Search'};
000:<:4959: 44: Request(74): PolyText8 drawable=0x02600005 gc=0x0260000a x=4
y=61 texts={ delta=0 s='3-Google Reader - Firefox'};
000:<:495a: 40: Request(74): PolyText8 drawable=0x02600005 gc=0x0260000a x=4
y=76 texts={ delta=0 s='4-Xpdf: DDBinding.pdf'};
000:<:495b: 40: Request(74): PolyText8 drawable=0x02600005 gc=0x0260000a x=4
y=91 texts={ delta=0 s='address@hidden:~ (0)'};
000:<:495c: 40: Request(74): PolyText8 drawable=0x02600005 gc=0x0260000a x=4
y=106 texts={ delta=0 s='address@hidden:~ (0)'};
000:<:495d: 60: Request(74): PolyText8 drawable=0x02600005 gc=0x0260000a x=4
y=121 texts={ delta=0 s='address@hidden:~/working/uia/router (0)'};
000:<:495e: 40: Request(74): PolyText8 drawable=0x02600005 gc=0x0260000a x=4
y=136 texts={ delta=0 s='address@hidden:~ (0)'};
000:<:495f: 52: Request(74): PolyText8 drawable=0x02600005 gc=0x0260000a x=4
y=151 texts={ delta=0 s='address@hidden:~/doc/vg/ffta (1)'};
000:<:4960: 44: Request(74): PolyText8 drawable=0x02600005 gc=0x0260000a x=4
y=166 texts={ delta=0 s='address@hidden:~ (0)'},{ s='\001'};
000:<:4961: 64: Request(74): PolyText8 drawable=0x02600005 gc=0x0260000a x=4
y=181 texts={ delta=0 s='address@hidden:~/working/certificate (0)'},{
s='\001'};
000:<:4962: 80: Request(74): PolyText8 drawable=0x02600005 gc=0x0260000a x=4
y=196 texts={ delta=0 s='12-Accounts - GnuCash
(/home/ctl/working/money/ctl.gnucash)'},{ s='\001'};
000:<:4963: 4: Request(43): GetInputFocus
000:>:0x4963:32: Reply to GetInputFocus: revert-to=PointerRoot(0x01)
focus=0x01200022
000:<:4964: 20: Request(55): CreateGC cid=0x02600055 drawable=0x00000039
values={function=Xor(0x06)}
000:<:4965: 20: Request(70): PolyFillRectangle drawable=0x02600005
gc=0x02600055 rectangles={x=0 y=139 w=539 h=15};
000:<:4966: 8: Request(60): FreeGC gc=0x02600055
000:<:4967: 24: Request(55): CreateGC cid=0x02600056 drawable=0x00000039
values={function=Xor(0x06) foreground=0x00b090b0}
000:<:4968: 20: Request(70): PolyFillRectangle drawable=0x02600005
gc=0x02600056 rectangles={x=0 y=139 w=539 h=15};
000:<:4969: 8: Request(60): FreeGC gc=0x02600056
000:<:496a: 4: Request(43): GetInputFocus
000:>:0x496a:32: Reply to GetInputFocus: revert-to=PointerRoot(0x01)
focus=0x01200022
000:<:496b: 4: Request(43): GetInputFocus
000:>:0x496b:32: Reply to GetInputFocus: revert-to=PointerRoot(0x01)
focus=0x01200022
000:<:496c: 4: Request(43): GetInputFocus
000:>:0x496c:32: Reply to GetInputFocus: revert-to=PointerRoot(0x01)
focus=0x01200022
000:<:496d: 4: Request(43): GetInputFocus
000:>:0x496d:32: Reply to GetInputFocus: revert-to=PointerRoot(0x01)
focus=0x01200022
Conclusions:
- Clearly I was totally wrong about the alarm race condition and my previous
suggested patch is bogus. Alarm is only involved insofar as every loop of
xmms/ratpoison interaction resets the alarm, so the bar doesn't get triggered
to hide.
- This seems pretty much an xmms bug. I might try later to fix it. In any
case, it might be reasonable to patch ratpoison to not reset the alarm in
response to update_window_names, or at least in the case where a
PropertyNotify
doesn't change anything. I have appended a patch to do this and, again, in
the
first five minutes of testing it seems to be helping.
Thanks,
Chris
diff -ru /home/ctl/src/ratpoison-1.4.0.dfsg/src/events.c
./ratpoison-1.4.0.dfsg/src/events.c
--- /home/ctl/src/ratpoison-1.4.0.dfsg/src/events.c 2006-06-23
16:07:29.000000000 -0400
+++ ./ratpoison-1.4.0.dfsg/src/events.c 2006-06-26 18:34:04.000000000 -0400
@@ -621,8 +621,8 @@
{
case XA_WM_NAME:
PRINT_DEBUG (("updating window name\n"));
- update_window_name (win);
- update_window_names (win->scr, defaults.window_fmt);
+ if ( update_window_name (win) )
+ update_window_names (win->scr, defaults.window_fmt);
break;
case XA_WM_NORMAL_HINTS:
diff -ru /home/ctl/src/ratpoison-1.4.0.dfsg/src/manage.c
./ratpoison-1.4.0.dfsg/src/manage.c
--- /home/ctl/src/ratpoison-1.4.0.dfsg/src/manage.c 2006-06-23
16:07:29.000000000 -0400
+++ ./ratpoison-1.4.0.dfsg/src/manage.c 2006-06-26 18:41:01.000000000 -0400
@@ -309,10 +309,12 @@
update_window_name (rp_window *win)
{
char *newstr;
+ int changed = 0;
newstr = get_wmname (win->w);
if (newstr != NULL)
{
+ changed = changed || win->wm_name == NULL || strcmp( newstr,
win->wm_name );
free (win->wm_name);
win->wm_name = newstr;
}
@@ -320,6 +322,7 @@
newstr = get_res_class (win->w);
if (newstr != NULL)
{
+ changed = changed || win->res_class == NULL || strcmp( newstr,
win->res_class );
free (win->res_class);
win->res_class = newstr;
}
@@ -327,11 +330,12 @@
newstr = get_res_name (win->w);
if (newstr != NULL)
{
+ changed = changed || win->res_name == NULL || strcmp( newstr,
win->res_name );
free (win->res_name);
win->res_name = newstr;
}
- return 1;
+ return changed;
}
/* Send an artificial configure event to the window. */
----- End forwarded message -----
Hochachtungsvoll,
Bernhard R. Link
--
mozilla-thunderbird: It cannot read mail, it cannot send mail. It is the
victory of dialup over the internet.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [RP] Fwd: Bug#375157: ratpoison: bar show/hide apparant race condition --- "stuck on",
Bernhard R. Link <=