diff options
Diffstat (limited to 'src/window')
-rw-r--r-- | src/window/window.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/window/window.c b/src/window/window.c index 642609b..4d72635 100644 --- a/src/window/window.c +++ b/src/window/window.c @@ -171,7 +171,7 @@ static int mgl_window_init(mgl_window *self, const char *title, int width, int h KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask | PointerMotionMask | Button1MotionMask | Button2MotionMask | Button3MotionMask | Button4MotionMask | Button5MotionMask | ButtonMotionMask | - StructureNotifyMask; + StructureNotifyMask | EnterWindowMask | LeaveWindowMask | VisibilityChangeMask | PropertyChangeMask | FocusChangeMask; window_attr.bit_gravity = NorthWestGravity; if(existing_window) { @@ -356,7 +356,7 @@ static void mgl_window_handle_key_event(mgl_window *self, XKeyEvent *xkey, mgl_e event->key.alt = ((xkey->state & Mod1Mask) != 0); event->key.control = ((xkey->state & ControlMask) != 0); event->key.shift = ((xkey->state & ShiftMask) != 0); - event->key.system = ((xkey->state & Mod4Mask) != 0); /* TODO: Fix, doesn't work */ + event->key.system = ((xkey->state & Mod4Mask) != 0); x11_context_update_key_state(self->context, event->key.code, pressed); } @@ -506,6 +506,7 @@ void mgl_window_set_view(mgl_window *self, mgl_view *new_view) { context->gl.glMatrixMode(GL_PROJECTION); context->gl.glLoadIdentity(); context->gl.glOrtho(0.0, new_view->size.x, new_view->size.y, 0.0, 0.0, 1.0); + context->gl.glMatrixMode(GL_MODELVIEW); } void mgl_window_get_view(mgl_window *self, mgl_view *view) { |