Summary: | kwin eats Ctrl-B | ||
---|---|---|---|
Product: | kcontrol | Reporter: | Devendra Deshpande <devendra> |
Component: | kcmkeys | Assignee: | Ellis Whitehead <ellis> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | aaronw |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Solaris | ||
Latest Commit: | Version Fixed In: | ||
Attachments: |
Patch for Sun's F22/Print key
The right patch file this time... |
Description
Devendra Deshpande
2002-07-16 15:27:19 UTC
I would think your X is buggy. do you get any output from kwin? Waiting for an answer. Sorry about the non-response. I thought this could be a Qt/X bug (like Stephen suggested before). So I built the new 3.1RC3 (with qt-copy,/KDE 3.1 RC3 from cvs, and gcc-3.1 on Solaris 7). Now, kwin doesn't crash anymore. However, any ^B I press silently disappears! The vi in xterm never gets to see them "^B"s!! And no, I do not see any output for kwin at all :-( Thanks, Devendra Hi, This is no longer a crash, just a minor irritation (that all ^B are eaten up). I did more investigation over the last few days, here is what is happening: kdecore (KAccel): Key: Ctrl+B => 'Desktop Screenshot' Where does 'Desktop Screenshot' get the Ctrl+B accelerator? (And why, of all the apps, is kwin taking a screenshot)? More stack traces using pstack during startup of the app resulted in this output: kdecore (KAccel): grabKey( key: 'Ctrl+B', bGrab: 1 ): keyCodeX: 6f keyModX: 4 8228: Simply go to the KControl shortcuts module and check what key is configured for the 'Desktop Screenshot'. If it's configured to use the default key, try if it works after you change it to something different. The default for the action is Alt+PrintScreen, which IIRC Sun keyboards don't have, so maybe it gets the keyboard combination wrong. Subject: Re: kwin crashes when ^B is pressed a couple of times On 28 Nov 2002 11:37:27 -0000 Lubos Lunak <l.lunak@kde.org> wrote: > > ------- Additional Comments From l.lunak@kde.org 2002-11-28 12:37 > ------- Simply go to the KControl shortcuts module and check what key > is configured for the 'Desktop Screenshot'. If it's configured to use > the default key, try if it works after you change it to something > different. The default for the action is Alt+PrintScreen, which IIRC > Sun keyboards don't have, so maybe it gets the keyboard combination > wrong. Wow! I did see Ctrl+Print for Screenshot. But the Sun keybaord I have DOES have a PrintScreen key, hence I never suspected foul play. But you were right, I explicitly assigned Ctrl+PrintScreen (which BTW is Ctrl+F22) and things work like a charm. Is it Qt that does not understand the PrintScreen key? Should I report this problem to Trolltech (this stuff worked Qt < 3.1, it only broke starting with Qt 3.1 Betas) ... Thanks a lot! Devendra There was a similar problem a couple months ago where X was returning keycodes for unassigned keys on some systems (!), but unfortunately I didn't think to report the bug to XFree at the time, and instead just wrote a work-around into kdelibs. I'll try to track it down again... I have also seen the same type of crash in _XmbTextListToTextProperty. I have a fix which I made in qt-3.0.5 but it hasn't yet made it into qt 3.1 or 3.0.6. The fix is as follows: in file qt-x11-free-3.0.5/src/kernel/qclipboard_x11.cpp 771c771,777 < char *list[] = { data.data() }; --- > if (data.resize(data.size()+1)) > *data.end() = 0; > char *list[] = { data.data(), ""}; > if (0 == list) { > qDebug("qclipboard_x11.cpp: encoded text/plain data is NULL"); > break; > } I have seen this problem elsewhere in KDE with many random crashes. The above fix solves the problem. I believe the problem is specific to Solaris and does not affect XFree86. The documentation on XmbTextListToTextProperty is somewhat ambiguous with how the list data should be formatted. Note that the main fix is appending a second NULL character to the first string. The second empty string is not really needed. Hopefully this will be fixed in qt 3.1.1. -Aaron Subject: Re: kwin crashes when ^B is pressed a couple of times On 4 Dec 2002 01:20:57 -0000 aaronw@net.com wrote: > > ------- You are receiving this mail because: ------- > You reported the bug, or are watching the reporter. > > http://bugs.kde.org/show_bug.cgi?id=45312 > > > > > ------- Additional Comments From aaronw@net.com 2002-12-04 02:20 > ------- I have also seen the same type of crash in > _XmbTextListToTextProperty. I have a fix which I made in qt-3.0.5 but > it hasn't yet made it into qt 3.1 or 3.0.6. The fix is as follows: > > in file qt-x11-free-3.0.5/src/kernel/qclipboard_x11.cpp Well, I did this to fix the problem: if ( (list[0] != NULL) && ( XmbTextListToTextProperty( dpy, list, 1, style, &textprop ) == Success ) ) { Note that, the third argument already specifies how many elements are going to be in the list. So, appending another element to data might not be required. Besides, what use is a property that has no text in it? But what do I know :-) Thanks, Devendra *** Bug 54174 has been marked as a duplicate of this bug. *** *** Bug 54046 has been marked as a duplicate of this bug. *** I too found this problem running on a Sun running Solaris 7. The workaround is as stated above. Change the keybindings for window and desktop screencapture to use something other than the default. For some reason Ctrl+Print maps to Ctrl+B. Could one of you with a Sun keyboard run 'xev' and tell me what symbol name you get for Sun's PrintScreen key? I'll add a hack to make sure that if Print returns Ctrl+B, to return Sun's PrintScreen key. Solaris does not appear to contain the 'xev' program. On my Ultrasparc, though, PrintScreen maps to F22. Is there a define that I can use to know if we're on solaris? I've taken a look at the code, and it would require a very inconvenient work-around for what I think is an X problem if I have to determine the problem dynamically. With a define the problem could be worked around with just 7 lines of simple code... Subject: Re: kwin eats Ctrl-B In Solaris (at least on Sparc), sun is defined. Using #ifdef sun #endif works fine. -Aaron Created attachment 1327 [details]
Patch for Sun's F22/Print key
Please try this out. It's a patch to kdelibs/kdecore/kkeyserver_x11.cpp -- an
initial attempt to make the Print key work on Solaris instead of being
converted to Ctrl+B.
Comment on attachment 1327 [details]
Patch for Sun's F22/Print key
Woops -- wrong patch
Created attachment 1328 [details]
The right patch file this time...
Please try this one instead -- the last one was the wrong file
I committed the patch to HEAD, so someone who is running head please let me know if it works. misty on IRC confirms that it works. thanks Ellis =))) |