From kde-core-devel Sat Oct 30 15:34:12 1999 From: Dawit Alemayehu Date: Sat, 30 Oct 1999 15:34:12 +0000 To: kde-core-devel Subject: Re: minicli and dead keys X-MARC-Message: https://marc.info/?l=kde-core-devel&m=94130410320892 On Sat, 30 Oct 1999, Carsten Pfeiffer wrote: > Hi, > > when commenting out > > if (XGrabKeyboard(qt_xdisplay(), runCombo->winId(),True,GrabModeAsync, > GrabModeAsync,CurrentTime) != GrabSuccess) > return False; > > from minicli.C, dead keys (@, ~, ...) work! Do we really need to grab the > keyboard here? At least on my system, everything works perfectly without > grabbing. > > I coulnd't figure out, why we're not getting any dead keys when grabbed - > sorry, I'm no Xlib hacker. From what I have read on XSetInputFocus and XGrabKeyboard in the Xlib manual, I do not see why XGrabKeyboard is needed either. I say this because according to the Xlib manual, if a valid focus window is passed to XSetInputFocus, it does exactly what XGrabKeyboard does with its owner_events flag set to True in terms of keyboard events. Which is exactly what is done in the XGrabKeyboard check above. So to me the XGrabKeyboard looks like a reduandant call. However, since I am not well versed in Xlib programming, I cannot tell why it was done this way in the first place. There must be some reason for it as I do not think it is there by mistake, but then again .... Regards, Dawit A.