Window focusWindow;
int focusState;
XGetInputFocus(displayHandle, &focusWindow, &focusState);
if (focusWindow == myWindow){
}
{/code]
"myWindow" is another Window variable which contains the id of my own window which was created with XCreateWindow.
The problem is that this code does only work with KDE but not with Gnome. I read that the function has problems with GTK based applications, but I could not find any information about an alternative. Is there an alternative function which does also work in Gnome? Or maybe another way to check if my window is on the top? I want to avail too many dependencies, so if it is possible I would like to use only functions from the standard Xlib but not Qt or somethink similar.
Thanks.
Window focusWindow int focusState XGetInputFocus
Hi!
I use the function XGetInputFocus to check if my window has the focus at the moment. Here is the part of code which does the check:
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement