Platform/Unix/X11Display: Adding processEvent() to handle resize.
This commit is contained in:
parent
31970826a4
commit
2ab5c7fc41
2 changed files with 20 additions and 0 deletions
|
|
@ -114,4 +114,22 @@ void X11Display::showCursor(bool value)
|
||||||
// TODO: Implement
|
// 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
|
} // namespace sp
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,8 @@ public :
|
||||||
|
|
||||||
virtual void showCursor(bool value);
|
virtual void showCursor(bool value);
|
||||||
|
|
||||||
|
void processEvent(const ::XEvent& event);
|
||||||
|
|
||||||
protected :
|
protected :
|
||||||
|
|
||||||
::Display* m_disp;
|
::Display* m_disp;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue