1
0
Fork 0
Commit graph

13 commits

Author SHA1 Message Date
75a53f635d source/Platform/Unix/X11EventQueue.cpp: Remove ResizeRequest. 2023-08-02 20:30:37 +02:00
090646b61a Platform/Unix: Rename X11SharedDisplay to Xlib, and remove Display member variable from all classes.
We now initialize/destroy the display in Xlib::init/shutdown that is called in UnixApplication::init/shutdown and
therefore is valid through the whole lifetime. So no need for classes to keep references.
2020-12-26 15:37:56 +01:00
d73c787f40 Platform/Unix/X11SharedDisplay: pass a pointer to the display to XReleaseDisplay() just to be sure client code has a valid pointer 2020-12-19 18:55:11 +01:00
03186ebea0 Platform/Unix/X11EventQueue.cpp: pass ButtonPress/ButtonRelease/MotionNotify events to X11Mouse 2020-12-19 18:55:11 +01:00
7356bdebdd Platform/Unix/X11EventQueue: Fix bug where messeges where not flushed to the event queue.
XEventsQueued(disp, QueuedAlready) only returns the number of events currently in the queue and
does not flush new events. So this must happen elsewhere and if it does not we
will never see any events. i noticed this bug when removing the call to glXSwapBuffers().

Fix this by using XPending() instead as this flushes new events
if the queue is empty before returning the length.

see https://tronche.com/gui/x/xlib/event-handling/XEventsQueued.html
and https://tronche.com/gui/x/xlib/event-handling/XPending.html
2020-12-19 18:55:11 +01:00
4193b3b719 Platform/Unix/X11EventQueue: send KeyPress and KeyRelease events to X11Keyboard::handleMessage() 2020-12-19 18:55:11 +01:00
23cf17f9af Platform/Unix/X11EventQueue.cpp: Only process one event per call to poll(). Confirming to Platform API. 2020-12-19 18:55:11 +01:00
7648c23e43 Platform/Unix/X11EventQueue: get and release display handle in constructor/destructor instead of every call to poll()
Should be fine as the display should never change during runtime.
2020-12-19 18:55:11 +01:00
c5648a5105 Platform/Unix/X11EventQueue: redirect unkown events to X11WindowEventHandler. 2020-12-19 18:55:11 +01:00
9b5bd9dcd0 source/Platform/Unix/X11EventQueue.cpp: post quit event on "WM_DELETE_WINDOW". 2020-12-19 18:55:10 +01:00
035dd333da source/Platform/Unix/X11EventQueue.cpp: log "WM_DESTROY_WINDOW" message. 2020-12-19 18:55:10 +01:00
f8188c4358 source/Platform/Unix/UnixEventQueue.cpp: implement a poll method (only log events for now) 2020-12-19 18:55:10 +01:00
6464838159 source/Platform/Unix: stub implementation 2020-12-19 18:55:10 +01:00