Merge remote-tracking branch 'origin/master' into 1.6
This commit is contained in:
@@ -89,6 +89,7 @@ X11::Cursor Cursors[(int32)CursorType::MAX];
|
||||
X11::XcursorImage* CursorsImg[(int32)CursorType::MAX];
|
||||
Dictionary<StringAnsi, X11::KeyCode> KeyNameMap;
|
||||
Array<KeyboardKeys> KeyCodeMap;
|
||||
Delegate<void*> LinuxPlatform::xEventRecieved;
|
||||
|
||||
// Message boxes configuration
|
||||
#define LINUX_DIALOG_MIN_BUTTON_WIDTH 64
|
||||
@@ -2232,10 +2233,12 @@ void LinuxPlatform::Tick()
|
||||
{
|
||||
X11::XEvent event;
|
||||
X11::XNextEvent(xDisplay, &event);
|
||||
|
||||
if (X11::XFilterEvent(&event, 0))
|
||||
continue;
|
||||
|
||||
// External event handling
|
||||
xEventRecieved(&event);
|
||||
|
||||
LinuxWindow* window;
|
||||
switch (event.type)
|
||||
{
|
||||
@@ -2640,10 +2643,8 @@ Float2 LinuxPlatform::GetMousePosition()
|
||||
{
|
||||
if (!xDisplay)
|
||||
return Float2::Zero;
|
||||
|
||||
int32 x, y;
|
||||
int32 x = 0, y = 0;
|
||||
uint32 screenCount = (uint32)X11::XScreenCount(xDisplay);
|
||||
|
||||
for (uint32 i = 0; i < screenCount; i++)
|
||||
{
|
||||
X11::Window outRoot, outChild;
|
||||
@@ -2652,7 +2653,6 @@ Float2 LinuxPlatform::GetMousePosition()
|
||||
if (X11::XQueryPointer(xDisplay, X11::XRootWindow(xDisplay, i), &outRoot, &outChild, &x, &y, &childX, &childY, &mask))
|
||||
break;
|
||||
}
|
||||
|
||||
return Float2((float)x, (float)y);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user