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.
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 )
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)
#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_
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);
{
draw(33);
usleep(1000);
-#ifdef WITH_INPUT_EVENTS
parseXEventsNonBlocking();
-#endif
}
destroyGLXContext();
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
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);
// 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)
{
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
// 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
{ 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}" }, \
# 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)