1
0
Fork 0

Platform/Unix/X11Display: Adding processEvent() to handle resize.

This commit is contained in:
Henrik Hautakoski 2019-12-30 05:32:31 +01:00
parent 31970826a4
commit 2ab5c7fc41
2 changed files with 20 additions and 0 deletions

View file

@ -114,4 +114,22 @@ void X11Display::showCursor(bool value)
// TODO: Implement
}
void X11Display::processEvent(const ::XEvent& event)
{
Vector2u size;
switch(event.xany.type) {
case ConfigureNotify:
size.x = event.xconfigure.width;
size.y = event.xconfigure.height;
if (m_size != size) {
m_size = size;
Log::info("X11: Resize event");
onReshape(size.x, size.y);
}
break;
}
}
} // namespace sp