// Force a raise on click here to deal with confused active state preventing to bring the window up
if(!atomsSupported[_net_active_window] && !window.isRemote)
XRaiseWindow(xGlobalDisplay, (X11Window)window.windowHandle);
- XSetInputFocus(xGlobalDisplay, (X11Window)window.windowHandle, RevertToPointerRoot, CurrentTime);
+ XSetInputFocus(xGlobalDisplay, (X11Window)window.windowHandle, RevertToParent, CurrentTime);
button = __ecereVMethodID___ecereNameSpace__ecere__gui__Window_OnLeftButtonDown;
buttonDouble = __ecereVMethodID___ecereNameSpace__ecere__gui__Window_OnLeftDoubleClick;
whichButton = 0;
}
case FocusIn:
{
+ guiApp.SetAppFocus(true);
+
if(activeWindow != (X11Window)window.windowHandle)
{
XFocusChangeEvent *event = (XFocusChangeEvent *) thisEvent;
}
case FocusOut:
{
+ if((X11Window)window.windowHandle == activeWindow)
+ guiApp.SetAppFocus(false);
+
#ifdef _DEBUG
//printf("Processing a FocusOut Event for %s (%x)\n", window._class.name, window);
#endif
#endif
XSendEvent(xGlobalDisplay, DefaultRootWindow(xGlobalDisplay), bool::false, SubstructureRedirectMask | SubstructureNotifyMask, (union _XEvent *)&event);
- XSetInputFocus(xGlobalDisplay, (X11Window)modalRoot.windowHandle, RevertToPointerRoot, timeStamp);
+ XSetInputFocus(xGlobalDisplay, (X11Window)modalRoot.windowHandle, RevertToParent, timeStamp);
+ guiApp.SetAppFocus(true);
activeWindow = (X11Window)window.windowHandle;
//XFlush(xGlobalDisplay);
}
else
{
- XSetInputFocus(xGlobalDisplay, (X11Window)window.windowHandle, RevertToPointerRoot, timeStamp);
+ XSetInputFocus(xGlobalDisplay, (X11Window)window.windowHandle, RevertToParent, timeStamp);
+ guiApp.SetAppFocus(true);
activeWindow = (X11Window)window.windowHandle;
window.ExternalActivate(true, true, window, null); // lastActive);
if(windowData && windowData.ic)
XSendEvent(xGlobalDisplay, DefaultRootWindow(xGlobalDisplay), bool::false, SubstructureRedirectMask | SubstructureNotifyMask, (union _XEvent *)&event);
//#if defined(__APPLE__)
- XSetInputFocus(xGlobalDisplay, (X11Window)window.windowHandle, RevertToPointerRoot, CurrentTime);
+ XSetInputFocus(xGlobalDisplay, (X11Window)window.windowHandle, RevertToParent, CurrentTime);
//#endif
}
else
- XSetInputFocus(xGlobalDisplay, (X11Window)window.windowHandle, RevertToPointerRoot, CurrentTime);
+ XSetInputFocus(xGlobalDisplay, (X11Window)window.windowHandle, RevertToParent, CurrentTime);
}
}
}
{
if(window.rootWindow.windowHandle)
XDefineCursor(xGlobalDisplay, (X11Window) window.rootWindow.windowHandle,
- cursor == -1 ? (X11Cursor)0 : systemCursors[(SystemCursor)cursor]);
+ cursor == -1 ? nullCursor : systemCursors[(SystemCursor)cursor]);
}
// --- Caret ---