downstream: cope with new keyboard functinoality (and partially disable it) sandbox/jankovac503/M14.4-WIP
authorJanos Kovacs <jankovac503@gmail.com>
Mon, 1 Dec 2014 18:27:59 +0000 (20:27 +0200)
committerJanos Kovacs <jankovac503@gmail.com>
Mon, 1 Dec 2014 18:30:54 +0000 (20:30 +0200)
Change-Id: Iae16747dd03a789dce44c1664aa2e325d62cd716

packaging/genivi-shell.spec
weston-ivi-shell/src/ivi-controller.c

index 18b856c..2e350a7 100644 (file)
@@ -98,6 +98,11 @@ install -m 644  ivi-extension-protocol.pc \
 %{_libdir}/libilmControl.so.*
 %{_libdir}/weston/ivi-controller.so
 
+%{_bindir}/EGLWLInputEventExample
+#%exclude %{_bindir}/EGLWLInputEventExample
+#%exclude /usr/lib/debug/usr/bin/EGLWLInputEventExample.debug
+
+
 %files devel
 %defattr(-,root,root)
 %{_includedir}/ilm/ilm_client.h
index fdda183..088f640 100755 (executable)
@@ -452,11 +452,13 @@ send_surface_event(struct wl_resource *resource,
                                                 prop->pixelformat);
     }
 #endif
+#ifdef SUPPORT_INPUT_FOCUS
     if (mask & IVI_NOTIFICATION_KEYBOARD_FOCUS) {
         ivi_controller_surface_send_input_focus(resource,
                         IVI_CONTROLLER_SURFACE_INPUT_DEVICE_KEYBOARD,
-                        prop->hasKeyboardFocus);
+                        prop->has_keyboard_focus);
     }
+#endif
     if (mask & IVI_NOTIFICATION_REMOVE) {
         send_surface_add_event(ivisurf, resource, IVI_NOTIFICATION_REMOVE);
     }
@@ -1083,24 +1085,27 @@ controller_surface_destroy(struct wl_client *client,
 
 static void send_all_keyboard_focus(struct ivishell *shell)
 {
-    struct ivi_layout_SurfaceProperties props;
+#ifdef SUPPORT_INPUT_FOCUS
+    const struct ivi_layout_surface_properties *props;
     struct ivicontroller_surface *ctrlsurf;
     struct ivisurface *current_surf;
     uint32_t id_surface;
 
     wl_list_for_each(current_surf, &shell->list_surface, link) {
-        ivi_layout_getPropertiesOfSurface(current_surf->layout_surface,
-                                          &props);
-        id_surface = ivi_layout_getIdOfSurface(current_surf->layout_surface);
+        if (!(props = ivi_layout_get_properties_of_surface(current_surf->layout_surface)))
+           props = &no_surface_props;
+
+        id_surface = ivi_layout_get_id_of_surface(current_surf->layout_surface);
         wl_list_for_each(ctrlsurf, &shell->list_controller_surface, link) {
             if (id_surface != ctrlsurf->id_surface) {
                     continue;
             }
             ivi_controller_surface_send_input_focus(ctrlsurf->resource,
                             IVI_CONTROLLER_SURFACE_INPUT_DEVICE_KEYBOARD,
-                            props.hasKeyboardFocus);
+                            props->has_keyboard_focus);
         }
     }
+#endif
 }
 
 static void