aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
m---------depends/mgl0
-rw-r--r--include/mglpp/window/Window.hpp1
-rw-r--r--src/window/Window.cpp4
3 files changed, 5 insertions, 0 deletions
diff --git a/depends/mgl b/depends/mgl
-Subproject 7acea115d95f57427ff8e34411d25ef5d9f46f4
+Subproject 407c87d4fe49876ebdc827682aec0928400409d
diff --git a/include/mglpp/window/Window.hpp b/include/mglpp/window/Window.hpp
index 009c9a5..5ef9d1a 100644
--- a/include/mglpp/window/Window.hpp
+++ b/include/mglpp/window/Window.hpp
@@ -63,6 +63,7 @@ namespace mgl {
bool create(WindowHandle existing_window);
bool poll_event(Event &event);
+ bool inject_x11_event(XEvent *xev, Event &event);
void clear(Color color = Color(0, 0, 0, 255));
void draw(Drawable &drawable, Shader *shader = nullptr);
diff --git a/src/window/Window.cpp b/src/window/Window.cpp
index 8cfc28e..615b1a9 100644
--- a/src/window/Window.cpp
+++ b/src/window/Window.cpp
@@ -40,6 +40,10 @@ namespace mgl {
return mgl_window_poll_event(&window, (mgl_event*)&event);
}
+ bool Window::inject_x11_event(XEvent *xev, Event &event) {
+ return mgl_window_inject_x11_event(&window, xev, (mgl_event*)&event);
+ }
+
void Window::clear(Color color) {
mgl_window_clear(&window, mgl_color{color.r, color.g, color.b, color.a});
}