namespace gui::drivers;
import "instance"
-#if !defined(ECERE_VANILLA) && !defined(ECERE_NO3D) && !defined(ECERE_NOGL)
+#if !defined(ECERE_VANILLA) && !defined(ECERE_NO3D) && !defined(ECERE_NOGL) && !defined(__ODROID__)
import "OpenGLDisplayDriver"
#endif
#include <X11/keysym.h>
#include <X11/cursorfont.h>
#include <fcntl.h>
-#if !defined(ECERE_NO3D) && !defined(ECERE_NOGL)
+#if !defined(ECERE_NO3D) && !defined(ECERE_NOGL) //&& !defined(__ODROID__)
#if defined(__EMSCRIPTEN__)
#include <GL/glfw.h>
#else
static Point lastPos[3];
Modifiers keyFlags = 0;
- bool doubleClick;
- uint button, buttonDouble, whichButton;
+ bool doubleClick = false;
+ uint button = 0, buttonDouble = 0, whichButton;
uint buttonMask = 0;
int x = event->x_root, y = event->y_root;
timeStamp = event->time;
{
window.KeyMessage(__ecereVMethodID___ecereNameSpace__ecere__gui__Window_OnKeyHit, { modifiers = keyFlags, code = (event->button == Button4) ? wheelUp : wheelDown }, 0);
}
- else
+ else if(button)
{
if(doubleClick)
{
attributes.override_redirect = (window.interim || (!atomsSupported[_net_wm_state] && !window.nativeDecorations)) ? True : False;
attributes.event_mask = EVENT_MASK;
//printf("%s\n", guiApp.defaultDisplayDriver);
-#if !defined(ECERE_VANILLA) && !defined(ECERE_NO3D) && !defined(ECERE_NOGL)
+#if !defined(ECERE_VANILLA) && !defined(ECERE_NO3D) && !defined(ECERE_NOGL) && !defined(__ODROID__)
if(window.dispDriver == class(OpenGLDisplayDriver) || !strcmp(guiApp.defaultDisplayDriver, "OpenGL"))
{
int samples;
};
visualInfo = glXChooseVisual(xGlobalDisplay, DefaultScreen(xGlobalDisplay), attrList);
}
+#elif defined(__ODROID__)
+ if(!visualInfo)
+ {
+ // System visual not working on ODROID?
+ int attrList[] =
+ {
+ GLX_USE_GL, GLX_DEPTH_SIZE, 1,
+ GLX_RGBA,
+ GLX_RED_SIZE, 1, GLX_GREEN_SIZE, 1, GLX_BLUE_SIZE, 1,
+ GLX_DOUBLEBUFFER,
+ None
+ };
+ visualInfo = glXChooseVisual(xGlobalDisplay, DefaultScreen(xGlobalDisplay), attrList);
+ }
#endif
depth = visualInfo ? visualInfo->depth : (window.alphaBlend ? 32 : xSystemDepth);
visual = visualInfo ? visualInfo->visual : (window.alphaBlend ? FindFullColorVisual (xGlobalDisplay, &depth) : xSystemVisual);