diff --git a/openlp/core/__init__.py b/openlp/core/__init__.py index 7ea737709..e28669fa5 100644 --- a/openlp/core/__init__.py +++ b/openlp/core/__init__.py @@ -35,6 +35,7 @@ logging and a plugin framework are contained within the openlp.core module. import os import sys +import platform import logging from optparse import OptionParser from traceback import format_exception @@ -266,6 +267,9 @@ def main(args=None): qt_args.extend(['-style', options.style]) # Throw the rest of the arguments at Qt, just in case. qt_args.extend(args) + # Bug #1018855: Set the WM_CLASS property in X11 + if platform.system() not in ['Windows', 'Darwin']: + qt_args.append('OpenLP') # Initialise the resources qInitResources() # Now create and actually run the application. diff --git a/openlp/core/lib/renderer.py b/openlp/core/lib/renderer.py index 81d5361cb..8dc03c33e 100644 --- a/openlp/core/lib/renderer.py +++ b/openlp/core/lib/renderer.py @@ -256,7 +256,7 @@ class Renderer(object): if not self.force_page: self.display.buildHtml(serviceItem) raw_html = serviceItem.get_rendered_frame(0) - self.display.text(raw_html) + self.display.text(raw_html, False) preview = self.display.preview() return preview self.force_page = False @@ -406,7 +406,14 @@ class Renderer(object): if theme_data.font_main_shadow: self.page_width -= int(theme_data.font_main_shadow_size) self.page_height -= int(theme_data.font_main_shadow_size) + # For the life of my I don't know why we have to completely kill the + # QWebView in order for the display to work properly, but we do. See + # bug #1041366 for an example of what happens if we take this out. + self.web = None + self.web = QtWebKit.QWebView() + self.web.setVisible(False) self.web.resize(self.page_width, self.page_height) + self.web_frame = self.web.page().mainFrame() # Adjust width and height to account for shadow. outline done in css. html = u"""