devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=1bbc23b08634444edee9a19603aaf3360489f483

commit 1bbc23b08634444edee9a19603aaf3360489f483
Author: Chris Michael <cp.mich...@samsung.com>
Date:   Wed Jul 27 13:28:10 2016 -0400

    ecore-drm2: Add API for vt-switching
    
    This commit adds a function we can call from inside Enlightenment in
    order to fix an issue with VT-Switching. The problem was when a client
    application is open, the compositor does not pass along the key-combo
    for vt-switch but rather sends it to an application. This patch (along
    with upcoming Enlightenment one) fixes the issue.
    
    NB: This late API add approved by Stefan ;)
    
    @feature
    
    Signed-off-by: Chris Michael <cp.mich...@samsung.com>
---
 src/lib/ecore_drm2/Ecore_Drm2.h        | 13 +++++++++++++
 src/lib/ecore_drm2/ecore_drm2_device.c |  8 ++++++++
 2 files changed, 21 insertions(+)

diff --git a/src/lib/ecore_drm2/Ecore_Drm2.h b/src/lib/ecore_drm2/Ecore_Drm2.h
index fa2e916..3de7999 100644
--- a/src/lib/ecore_drm2/Ecore_Drm2.h
+++ b/src/lib/ecore_drm2/Ecore_Drm2.h
@@ -303,6 +303,19 @@ EAPI void 
ecore_drm2_device_screen_size_range_get(Ecore_Drm2_Device *device, int
 EAPI void ecore_drm2_device_calibrate(Ecore_Drm2_Device *device, int w, int h);
 
 /**
+ * Try to switch to a given virtual terminal
+ *
+ * @param device
+ * @param vt
+ *
+ * @return EINA_TRUE on success, EINA_FALSE otherwise
+ *
+ * @ingroup Ecore_Drm2_Device_Group
+ * @since 1.18
+ */
+EAPI Eina_Bool ecore_drm2_device_vt_set(Ecore_Drm2_Device *device, int vt);
+
+/**
  * @defgroup Ecore_Drm2_Output_Group Drm output functions
  *
  * Functions that deal with setup of outputs
diff --git a/src/lib/ecore_drm2/ecore_drm2_device.c 
b/src/lib/ecore_drm2/ecore_drm2_device.c
index 8794063..8f2e43c 100644
--- a/src/lib/ecore_drm2/ecore_drm2_device.c
+++ b/src/lib/ecore_drm2/ecore_drm2_device.c
@@ -363,3 +363,11 @@ ecore_drm2_device_calibrate(Ecore_Drm2_Device *device, int 
w, int h)
 
    elput_input_devices_calibrate(device->em, w, h);
 }
+
+EAPI Eina_Bool
+ecore_drm2_device_vt_set(Ecore_Drm2_Device *device, int vt)
+{
+   EINA_SAFETY_ON_NULL_RETURN_VAL(device, EINA_FALSE);
+
+   return elput_manager_vt_set(device->em, vt);
+}

-- 


Reply via email to