浏览代码

Fix fullscreen and reload host commands

Fixes the default key bindings as well.
Vincent Lang 9 年之前
父节点
当前提交
b843c03b08
共有 2 个文件被更改,包括 7 次插入1 次删除
  1. 1 0
      src/ui/KonvergoWindow.cpp
  2. 6 1
      src/ui/KonvergoWindow.h

+ 1 - 0
src/ui/KonvergoWindow.cpp

@@ -85,6 +85,7 @@ KonvergoWindow::KonvergoWindow(QWindow* parent) : QQuickWindow(parent), m_debugL
   InputComponent::Get().registerHostCommand("close", this, "close");
   InputComponent::Get().registerHostCommand("toggleDebug", this, "toggleDebug");
   InputComponent::Get().registerHostCommand("reload", this, "reloadWeb");
+  InputComponent::Get().registerHostCommand("fullscreen", this, "toggleFullscreen");
 
 #ifdef TARGET_RPI
   // On RPI, we use dispmanx layering - the video is on a layer below Konvergo,

+ 6 - 1
src/ui/KonvergoWindow.h

@@ -44,7 +44,12 @@ public:
 
   Q_SLOT void toggleDebug();
 
-  void reloadWeb()
+  Q_SLOT void toggleFullscreen()
+  {
+    setFullScreen(!isFullScreen());
+  }
+
+  Q_SLOT void reloadWeb()
   {
     emit reloadWebClient();
   }