Remove cmake flag WITH_INPUT_EVENTS
authorFrédéric Blain <frederic.blain@valeo.com>
Thu, 5 Jul 2012 15:38:59 +0000 (17:38 +0200)
committerTimo Lotterbach <timo.lotterbach@bmw-carit.de>
Fri, 20 Jul 2012 07:07:16 +0000 (00:07 -0700)
Input events are now activated permanently to LayerManager. This won't add any rutime overhead with the new Input frameworkt as long as the methods report[Key/Pointer/Touch] events are not called. Thus, no impact for people that do not wan't to use input events.

CMakeLists.txt
LayerManagerExamples/GLXApplicationExample/CMakeLists.txt
LayerManagerExamples/GLXApplicationExample/include/xevents.h
LayerManagerExamples/GLXApplicationExample/src/gl2application.cpp
LayerManagerExamples/GLXApplicationExample/src/glxX11_application.cpp
LayerManagerExamples/GLXApplicationExample/src/glx_helper.cpp
LayerManagerPlugins/Renderers/Graphic/src/WindowSystems/X11WindowSystem.cpp
README
config/res/config.h.cmake
toolchain.cmake

index d09192d..aefa202 100644 (file)
@@ -42,7 +42,6 @@ option (WITH_WL_EXAMPLE     "Build EGL_EXAMPLE / Wayland"
 option (WITH_DESKTOP        "Build for Desktop / GLX"                             OFF)
 option (WITH_GLX_LIB        "Build development library for GLX Based Renderers"   OFF)
 option (WITH_GLX_EXAMPLE    "Build GLX_EXAMPLE "                                  OFF)
-option (WITH_INPUT_EVENTS   "Activate input events handling"                      OFF)
 option (WITH_FORCE_COPY     "Force Software Copy of Pixmaps"                      OFF)
 option (WITH_XTHREADS       "Build with usage of X11 Threading"                   ON )
 option (WITH_CLIENTEXAMPLES "Build client examples "                              ON )
index e6793a7..a2484f2 100644 (file)
@@ -26,11 +26,7 @@ include_directories ("../../LayerManagerClient/ilmClient/include")
 include_directories ("../LayerSceneDescriptionExample/include")
 include_directories ("../../LayerManagerUtils/include")
 
-if (WITH_INPUT_EVENTS)
 add_executable(GLX11ApplicationExample src/glx_helper.cpp src/glxX11_application.cpp src/gl2application.cpp src/xevents.cpp)
-else (WITH_INPUT_EVENTS)
-add_executable(GLX11ApplicationExample src/glx_helper.cpp src/glxX11_application.cpp src/gl2application.cpp)
-endif (WITH_INPUT_EVENTS)
 
 add_dependencies(GLX11ApplicationExample ilmClient)
 add_dependencies(GLX11ApplicationExample LayerManagerUtils) 
index fb1cad7..afee545 100644 (file)
 #ifndef _XEVENTS_H_
 #define _XEVENTS_H_
 
-#include "config.h"
-#ifdef WITH_INPUT_EVENTS
-
+#include "config.h" 
 #include <X11/Xlib.h>
 #include "ilm_client.h"
 
 void xeventInitialiaze(Display* dpy, t_ilm_surface surfaceid, t_ilm_int x, t_ilm_int y, t_ilm_int width, t_ilm_int height);
 void parseXEventsNonBlocking();
 
-#endif // WITH_INPUT_EVENTS
 
 #endif // _XEVENTS_H_
 
index 13bc81b..63b0190 100644 (file)
@@ -78,12 +78,8 @@ t_ilm_bool initGlApplication(GLuint width, GLuint height)
 
     glMatrixMode(GL_MODELVIEW);
     glLoadIdentity();
-#ifdef WITH_INPUT_EVENTS
        /* Make the background visible so that we can click on it */
        glClearColor(.2f, .4f, .5f, 1.0f);
-#else
-    glClearColor(1.0f, 1.0f, 1.0f, 0.0f);
-#endif
     glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
     glEnable(GL_BLEND);
 
index dbc09e6..6c368aa 100644 (file)
@@ -71,9 +71,7 @@ int main()
     {
         draw(33);
         usleep(1000);
-#ifdef WITH_INPUT_EVENTS
                parseXEventsNonBlocking();
-#endif
     }
 
     destroyGLXContext();
index c54c6fe..38f4304 100644 (file)
@@ -162,9 +162,7 @@ t_ilm_bool createGLXContext(t_ilm_int width, t_ilm_int height)
     printf("Set surface opacity\n");
     ilm_surfaceSetOpacity(surfaceid, 0.75f);
 
-#ifdef WITH_INPUT_EVENTS
     xeventInitialiaze(g_x11ContextStruct.x11Display, surfaceid, 0, 0, width, height);
-#endif
 
     printf("commit\n");
     // commit will indicate error, if any command failed
index 0fbbe06..6aecbc3 100644 (file)
@@ -495,11 +495,7 @@ bool X11WindowSystem::CreateCompositorWindow()
     XSetWindowAttributes attr;
     // draw a black background the full size of the resolution
     attr.override_redirect = True;
-#ifdef WITH_INPUT_EVENTS
     attr.event_mask =  ExposureMask | StructureNotifyMask | ButtonPressMask | ButtonReleaseMask | Button1MotionMask;
-#else
-    attr.event_mask = ExposureMask | StructureNotifyMask;
-#endif
     attr.background_pixel = 0;
     attr.border_pixel = 0;
     windowVis = getVisualFunc(x11Display);
@@ -902,12 +898,12 @@ init_complete:
                 //           else
                 //               renderer->DestroyWindow(event.xreparent.window);
                 break;
-#ifdef WITH_INPUT_EVENTS
+
             case ButtonPress:
             case ButtonRelease:
             case MotionNotify:
                 break;
-#endif
+
             default:
                 if (event.type == this->damage_event + XDamageNotify)
                 {
diff --git a/README b/README
index 624e9b4..5becdd9 100644 (file)
--- a/README
+++ b/README
@@ -203,10 +203,6 @@ Supported Build Options
   Option: -DWITH_XTHREADS=ON or
           -DWITH_XTHREADS=OFF
 
-- Build with INPUT EVENT support, switches input forwarding of events on
-  Option: -DWITH_INPUT_EVENTS=ON or
-          -DWITH_INPUT_EVENTS=OFF
-
 - Build available tests
   Option: -DWITH_TESTS=ON or
           -DWITH_TESTS=OFF
index b2d2661..bd8ebdb 100644 (file)
@@ -66,9 +66,6 @@
 // Build development library for GLX Based Renderers
 #cmakedefine WITH_GLX_LIB
 
-// enable input event handling
-#cmakedefine WITH_INPUT_EVENTS
-
 // build unit tests for all projects
 #cmakedefine WITH_TESTS
 
@@ -118,7 +115,6 @@ typedef struct
 { DEBUG_FLAG, "WITH_GLESv2_LIB     = ${WITH_GLESv2_LIB}"      }, \
 { DEBUG_FLAG, "WITH_GLX_EXAMPLE    = ${WITH_GLX_EXAMPLE}"     }, \
 { DEBUG_FLAG, "WITH_GLX_LIB        = ${WITH_GLX_LIB}"         }, \
-{ DEBUG_FLAG, "WITH_INPUT_EVENTS   = ${WITH_INPUT_EVENTS}"    }, \
 { DEBUG_FLAG, "WITH_TESTS          = ${WITH_TESTS}"           }, \
 { DEBUG_FLAG, "WITH_X11_GLES       = ${WITH_X11_GLES}"        }, \
 { DEBUG_FLAG, "WITH_WAYLAND        = ${WITH_WAYLAND}"         }, \
index 2e0b835..f3c2c79 100644 (file)
@@ -50,9 +50,6 @@ set (WITH_FORCE_COPY OFF CACHE STRING "" FORCE)
 # Disable compilation of unit test
 set (WITH_TESTS OFF CACHE STRING "" FORCE)
 
-# Enable Input Event handling
-set (WITH_INPUT_EVENTS ON CACHE STRING "" FORCE)
-
 # Enable XThreads to post signals over different threads - switching polling to push notification
 set (WITH_XTRHEADS ON CACHE STRING "" FORCE)