Fix display issues with Gnome Shell

bzr-revno: 1852
This commit is contained in:
Jonathan Corwin 2011-12-22 17:47:44 +00:00
commit 1f6be045f5
2 changed files with 13 additions and 4 deletions

View File

@ -32,7 +32,7 @@ import platform
import sqlalchemy import sqlalchemy
import BeautifulSoup import BeautifulSoup
from lxml import etree from lxml import etree
from PyQt4 import Qt, QtCore, QtGui from PyQt4 import Qt, QtCore, QtGui, QtWebKit
try: try:
from PyQt4.phonon import Phonon from PyQt4.phonon import Phonon
@ -77,6 +77,11 @@ try:
UNO_VERSION = node.getByName(u'ooSetupVersion') UNO_VERSION = node.getByName(u'ooSetupVersion')
except ImportError: except ImportError:
UNO_VERSION = u'-' UNO_VERSION = u'-'
try:
WEBKIT_VERSION = QtWebKit.qWebKitVersion()
except AttributeError:
WEBKIT_VERSION = u'-'
from openlp.core.lib import translate, SettingsManager from openlp.core.lib import translate, SettingsManager
from openlp.core.lib.ui import UiStrings from openlp.core.lib.ui import UiStrings
@ -111,6 +116,7 @@ class ExceptionForm(QtGui.QDialog, Ui_ExceptionDialog):
u'Qt4: %s\n' % Qt.qVersion() + \ u'Qt4: %s\n' % Qt.qVersion() + \
u'Phonon: %s\n' % PHONON_VERSION + \ u'Phonon: %s\n' % PHONON_VERSION + \
u'PyQt4: %s\n' % Qt.PYQT_VERSION_STR + \ u'PyQt4: %s\n' % Qt.PYQT_VERSION_STR + \
u'QtWebkit: %s\n' % WEBKIT_VERSION + \
u'SQLAlchemy: %s\n' % sqlalchemy.__version__ + \ u'SQLAlchemy: %s\n' % sqlalchemy.__version__ + \
u'SQLAlchemy Migrate: %s\n' % MIGRATE_VERSION + \ u'SQLAlchemy Migrate: %s\n' % MIGRATE_VERSION + \
u'BeautifulSoup: %s\n' % BeautifulSoup.__version__ + \ u'BeautifulSoup: %s\n' % BeautifulSoup.__version__ + \

View File

@ -29,6 +29,7 @@ The :mod:`maindisplay` module provides the functionality to display screens
and play multimedia within OpenLP. and play multimedia within OpenLP.
""" """
import logging import logging
import os
from PyQt4 import QtCore, QtGui, QtWebKit, QtOpenGL from PyQt4 import QtCore, QtGui, QtWebKit, QtOpenGL
from PyQt4.phonon import Phonon from PyQt4.phonon import Phonon
@ -120,9 +121,11 @@ class MainDisplay(Display):
self.audioPlayer = None self.audioPlayer = None
self.firstTime = True self.firstTime = True
self.setStyleSheet(u'border: 0px; margin: 0px; padding: 0px;') self.setStyleSheet(u'border: 0px; margin: 0px; padding: 0px;')
self.setWindowFlags(QtCore.Qt.FramelessWindowHint | QtCore.Qt.Tool | windowFlags = QtCore.Qt.FramelessWindowHint | QtCore.Qt.Tool | \
QtCore.Qt.WindowStaysOnTopHint | QtCore.Qt.WindowStaysOnTopHint
QtCore.Qt.X11BypassWindowManagerHint) if os.environ.get(u'XDG_CURRENT_DESKTOP') == u'Unity':
windowFlags = windowFlags | QtCore.Qt.X11BypassWindowManagerHint
self.setWindowFlags(windowFlags)
self.setAttribute(QtCore.Qt.WA_DeleteOnClose) self.setAttribute(QtCore.Qt.WA_DeleteOnClose)
if self.isLive: if self.isLive:
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.QObject.connect(Receiver.get_receiver(),