From f9baf9a23d15e9597db2c0bcd8dc86cb8ba245ad Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 15 Apr 2014 15:08:09 +0000 Subject: [PATCH] some experiments --- dgl/src/Window.cpp | 6 ++++++ dgl/src/pugl/pugl_x11.c | 4 +--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/dgl/src/Window.cpp b/dgl/src/Window.cpp index 9463a67f..f0517dfe 100644 --- a/dgl/src/Window.cpp +++ b/dgl/src/Window.cpp @@ -14,6 +14,9 @@ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +// we need this for now +#define XKEYFOCUSGRAB 1 + #include "../App.hpp" #include "../Widget.hpp" #include "../Window.hpp" @@ -198,8 +201,10 @@ public: DBG("Success!\n"); +#if 0 // process any initial events puglProcessEvents(fView); +#endif fApp._addWindow(fSelf); } @@ -583,6 +588,7 @@ protected: //DBG("PUGL: onDisplay\n"); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + glLoadIdentity(); FOR_EACH_WIDGET(it) { diff --git a/dgl/src/pugl/pugl_x11.c b/dgl/src/pugl/pugl_x11.c index 5521cb0d..d38eecf1 100644 --- a/dgl/src/pugl/pugl_x11.c +++ b/dgl/src/pugl/pugl_x11.c @@ -194,8 +194,6 @@ static void puglDisplay(PuglView* view) { glXMakeCurrent(view->impl->display, view->impl->win, view->impl->ctx); - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - glLoadIdentity(); if (view->displayFunc) { view->displayFunc(view); @@ -364,7 +362,7 @@ puglProcessEvents(PuglView* view) } } break; -#ifdef PUGL_GRAB_FOCUS +#ifdef XKEYFOCUSGRAB case EnterNotify: XSetInputFocus(view->impl->display, view->impl->win,