[ icewm-Bugs-480804 ] Focus bug with IceWM and GNOME Panel
Brought to you by:
captnmark
From: <no...@so...> - 2002-04-29 08:09:17
|
Bugs item #480804, was opened at 2001-11-12 07:14 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=100031&aid=480804&group_id=31 >Category: verify Group: key/mouse bindings Status: Open Resolution: Fixed Priority: 3 Submitted By: Ashok Narayanan (ashokn) Assigned to: Marko Macek (captnmark) Summary: Focus bug with IceWM and GNOME Panel Initial Comment: I use IceWM with the GNOME Panel only, as part of a GNOME session or outside of it (i.e. menually started). The key is that I don't use a filemanager (Nautilus or GMC). The Panel is on every desktop. I noticed when I upgraded to IceWM 1.0.9 from my old 1.0.4 installation, that my keyboard shortcuts for switching desktops stopped working. Some investigation yielded the following: - The change happened after 1.0.7 - Keyboard shortcuts for switching desktops (in .icewm/preferences) and for other applications (in .icewm/keys) both stopped working - The problem only exists on a desktop where I have no open windows (i.e. only the panel). If I have a desktop with any other window already open on it, all keyboard shortcuts work. But the moment I switch to a desktop with no open windows, everything stops. So my initial workaround was to run a sticky xterm; but this is a suboptimal solution. - The problem only occurs if I am running *only* the Panel. If I run the Panel and Nautilus, or if I run IceWM without the Panel, there is no problem. I looked through the code and tracked the problem down to this particular commit: wmmgr.cc: Revision 1.20: on Tue Apr 3 20:45:30 2001 UTC (7 months, 1 week ago) by captnmark Specifically, this commit adds the following code to wmmgr.cc: =================================================================== RCS file: /cvsroot/icewm/icewm-1.0/src/wmmgr.cc,v retrieving revision 1.19 retrieving revision 1.20 diff -c -r1.19 -r1.20 *** icewm/icewm-1.0/src/wmmgr.cc2001/03/31 18:20:211.19 --- icewm/icewm-1.0/src/wmmgr.cc2001/04/03 20:45:301.20 *************** *** 550,562 **** if (ff) switchFocusFrom(ff); } if (f && f->visible()) { if (c && c->visible() && !(f->isRollup() || f->isIconic())) w = c->handle(); else w = f->handle(); ! switchFocusTo(f); } #if 0 if (w == desktop->handle()) { --- 550,569 ---- if (ff) switchFocusFrom(ff); } + bool input = true; + XWMHints *hints = c ? c->hints() : 0; + + if (hints && (hints->flags & InputHint) && !hints->input) + input = false; + if (f && f->visible()) { if (c && c->visible() && !(f->isRollup() || f->isIconic())) w = c->handle(); else w = f->handle(); ! if (input) ! switchFocusTo(f); } #if 0 if (w == desktop->handle()) { *************** *** 573,582 **** app->getEventTime(), w); } #endif - XSetInputFocus(app->display(), w, RevertToNone, CurrentTime); ! if (c && w == c->handle() && c->protocols() & YFrameClient::wpTakeFocus) c->sendMessage(_XA_WM_TAKE_FOCUS); if (!pointerColormap) setColormapWindow(f); --- 580,593 ---- app->getEventTime(), w); } #endif ! if (input) { ! XSetInputFocus(app->display(), w, RevertToNone, CurrentTime); ! } ! ! if (c && w == c->handle() && c->protocols() & YFrameClient::wpTakeFocus) { c->sendMessage(_XA_WM_TAKE_FOCUS); + } if (!pointerColormap) setColormapWindow(f); =================================================================== The code appears to avoid the switchFocusTo() and XSetInputFocus() calls under certain conditions (checking hints().flags & InputHint, except for the override). Removing this commit solved my problem (i.e. I commented out the "if (input)" sections in both cases). So it looks like there is something bogus here, either about this fix itself or a preexisting bug in Panel and/or IceWM which is tickled by this problem. Does anybody have information about this issue? - Has this problem been seen elsewhere? - Is there a unified solution that will work for me, as well as solving the problem that this fix solved? Since I am not on icewm-devel, please CC me on any reply. ---------------------------------------------------------------------- Comment By: Marko Macek (captnmark) Date: 2002-04-14 17:47 Message: Logged In: YES user_id=1814 A candidate fix has been checked in. ---------------------------------------------------------------------- Comment By: Nick Hsmley (nhems) Date: 2002-01-22 18:43 Message: Logged In: YES user_id=247165 This happened for me when i upgraded from GNOME 1.2 to 1.4. Icewm worked fine up till the latest release at that time, on 1.2 (it was icewm 1.0.9 i think) It broke when i swithced to 1.4. This is a really frustrating bug, thanx for the help! Dont know if the fix will work for me, but i am trying it with latest icewm stable. Hope this comment helps ---------------------------------------------------------------------- Comment By: Greg Schafer (gschafer) Date: 2002-01-13 15:06 Message: Logged In: YES user_id=237017 Hello I just want to comment that I was having this exact same problem (running Icewm with GNOME panel and losing keyboard focus when switching to a blank workspace). Reverting this patch fixed it for me as well. This is really a bad bug that makes Icewwm unusable with GNOME IMHO. Otherwise, its a great WM. Thanks Greg ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=100031&aid=480804&group_id=31 |