Fix bug #1092121: Interface unusable when run on XFce

bzr-revno: 2131
Fixes: https://launchpad.net/bugs/1092121
This commit is contained in:
Arjan Schrijver 2012-12-23 00:30:25 +02:00 committed by Raoul Snyman
commit 38a9641b16
2 changed files with 6 additions and 0 deletions

View File

@ -490,6 +490,9 @@ class AdvancedTab(SettingsTab):
# Default to False on Gnome. # Default to False on Gnome.
x11_bypass_default = bool(not x11_bypass_default = bool(not
os.environ.get(u'GNOME_DESKTOP_SESSION_ID')) os.environ.get(u'GNOME_DESKTOP_SESSION_ID'))
# Default to False on XFce
if os.environ.get(u'DESKTOP_SESSION') == u'xfce':
x11_bypass_default = False
self.x11BypassCheckBox.setChecked(settings.value( self.x11BypassCheckBox.setChecked(settings.value(
u'x11 bypass wm', QtCore.QVariant(x11_bypass_default)).toBool()) u'x11 bypass wm', QtCore.QVariant(x11_bypass_default)).toBool())
self.defaultColor = settings.value(u'default color', self.defaultColor = settings.value(u'default color',

View File

@ -143,6 +143,9 @@ class MainDisplay(Display):
# Default to False on Gnome. # Default to False on Gnome.
x11_bypass_default = bool(not x11_bypass_default = bool(not
os.environ.get(u'GNOME_DESKTOP_SESSION_ID')) os.environ.get(u'GNOME_DESKTOP_SESSION_ID'))
# Default to False on XFce
if os.environ.get(u'DESKTOP_SESSION') == u'xfce':
x11_bypass_default = False
if Settings().value(u'advanced/x11 bypass wm', if Settings().value(u'advanced/x11 bypass wm',
QtCore.QVariant(x11_bypass_default)).toBool(): QtCore.QVariant(x11_bypass_default)).toBool():
windowFlags |= QtCore.Qt.X11BypassWindowManagerHint windowFlags |= QtCore.Qt.X11BypassWindowManagerHint