Skip to content

Commit

Permalink
Added GUI for toggling of seamless mode for windows
Browse files Browse the repository at this point in the history
Added two buttons to enable/disable seamless mode
for windows qubes.

references QubesOS/qubes-issues#3585
references QubesOS/qubes-issues#4342
  • Loading branch information
marmarta committed Oct 23, 2018
1 parent 693f3e4 commit 65b50c0
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 35 deletions.
16 changes: 15 additions & 1 deletion qubesmanager/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#
#


import collections
import os.path
import os
Expand Down Expand Up @@ -668,6 +667,21 @@ def __init_advanced_tab__(self):

self.update_virt_mode_list()

windows_running = self.vm.features.get('os', None) == 'Windows' and \
self.vm.is_running()

self.seamless_on_button.setEnabled(windows_running)
self.seamless_off_button.setEnabled(windows_running)

self.seamless_on_button.clicked.connect(self.enable_seamless)
self.seamless_off_button.clicked.connect(self.disable_seamless)

def enable_seamless(self):
self.vm.run_service_for_stdio("qubes.SetGuiMode", input=b'SEAMLESS')

def disable_seamless(self):
self.vm.run_service_for_stdio("qubes.SetGuiMode", input=b'FULLSCREEN')

def __apply_advanced_tab__(self):
msg = []

Expand Down
97 changes: 63 additions & 34 deletions ui/settingsdlg.ui
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<iconset resource="../resources.qrc">
<normaloff>:/root.png</normaloff>:/root.png</iconset>
</property>
<layout class="QGridLayout" name="gridLayout">
<layout class="QGridLayout" name="gridLayout" rowstretch="0" columnstretch="0">
<item row="0" column="0">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
Expand All @@ -29,7 +29,7 @@
<locale language="English" country="UnitedStates"/>
</property>
<property name="currentIndex">
<number>4</number>
<number>1</number>
</property>
<widget class="QWidget" name="basic_tab">
<property name="locale">
Expand Down Expand Up @@ -596,38 +596,6 @@ border-width: 1px;</string>
</item>
</layout>
</item>
<item row="2" column="0">
<widget class="QGroupBox" name="other_groupbox">
<property name="title">
<string>Other</string>
</property>
<layout class="QFormLayout" name="formLayout_2">
<property name="topMargin">
<number>15</number>
</property>
<item row="1" column="0">
<widget class="QLabel" name="label_26">
<property name="text">
<string>Default DispVM:</string>
</property>
<property name="buddy">
<cstring>default_dispvm</cstring>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="default_dispvm"/>
</item>
<item row="2" column="0" colspan="2">
<widget class="QPushButton" name="boot_from_device_button">
<property name="text">
<string>Boot qube from CDROM</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="0" column="0" rowspan="2">
<widget class="QGroupBox" name="groupBox_2">
<property name="enabled">
Expand Down Expand Up @@ -799,6 +767,67 @@ border-width: 1px;</string>
</property>
</spacer>
</item>
<item row="2" column="0">
<widget class="QGroupBox" name="other_groupbox">
<property name="title">
<string>Other</string>
</property>
<layout class="QFormLayout" name="formLayout_2">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<property name="topMargin">
<number>15</number>
</property>
<item row="1" column="0">
<widget class="QLabel" name="label_26">
<property name="text">
<string>Default DispVM:</string>
</property>
<property name="buddy">
<cstring>default_dispvm</cstring>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="default_dispvm"/>
</item>
<item row="2" column="0" colspan="2">
<widget class="QPushButton" name="boot_from_device_button">
<property name="text">
<string>Boot qube from CDROM</string>
</property>
</widget>
</item>
<item row="3" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_8">
<item>
<widget class="QPushButton" name="seamless_on_button">
<property name="toolTip">
<string>Windows (with Qubes Windows Tools installed) only.
The qube must be running to enable seamless mode; this setting is not persistent.</string>
</property>
<property name="text">
<string>Enable seamless mode</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="seamless_off_button">
<property name="toolTip">
<string>Windows (with Qubes Windows Tools installed) only.
The qube must be running to disable seamless mode; this setting is not persistent.</string>
</property>
<property name="text">
<string>Disable seamless mode</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="firewall_tab">
Expand Down

0 comments on commit 65b50c0

Please sign in to comment.