forked from openlp/openlp
Improve the detection of powerpoints presentation window by only looking at the filename root.
This commit is contained in:
parent
2bc78ffd25
commit
f0232d7147
@ -379,8 +379,9 @@ class PowerpointDocument(PresentationDocument):
|
|||||||
log.debug('compare size: %d and %d, %d and %d, %d and %d, %d and %d'
|
log.debug('compare size: %d and %d, %d and %d, %d and %d, %d and %d'
|
||||||
% (size.y(), top, size.height(), (bottom - top), size.x(), left, size.width(), (right - left)))
|
% (size.y(), top, size.height(), (bottom - top), size.x(), left, size.width(), (right - left)))
|
||||||
log.debug('window title: %s' % window_title)
|
log.debug('window title: %s' % window_title)
|
||||||
|
filename_root, filename_ext = os.path.splitext(os.path.basename(self.file_path))
|
||||||
if size.y() == top and size.height() == (bottom - top) and size.x() == left and \
|
if size.y() == top and size.height() == (bottom - top) and size.x() == left and \
|
||||||
size.width() == (right - left) and os.path.basename(self.file_path) in window_title:
|
size.width() == (right - left) and filename_root in window_title:
|
||||||
log.debug('Found a match and will save the handle')
|
log.debug('Found a match and will save the handle')
|
||||||
self.presentation_hwnd = hwnd
|
self.presentation_hwnd = hwnd
|
||||||
# Stop powerpoint from flashing in the taskbar
|
# Stop powerpoint from flashing in the taskbar
|
||||||
|
Loading…
Reference in New Issue
Block a user