openstenoproject / plover

Open source stenotype engine
http://opensteno.org/plover
GNU General Public License v2.0
2.36k stars 277 forks source link

Plover doesn't repaint correctly on monitor change #704

Closed arxanas closed 6 years ago

arxanas commented 7 years ago

Classification: Bug

Reproducibility: Sometimes

Summary

Switching displays causes black artifacts in the Plover windows.

Steps to Reproduce

  1. Connect laptop to external monitor and shut laptop, so the only display being used is the monitor.
  2. Launch Plover.
  3. Disconnect laptop from external monitor.
  4. Open laptop again and look at any Plover window. It oftentimes has black artifacts.

The problem also manifests if I start with the laptop and go to the monitor. It's perhaps worth noting that the window will have moved, because the display are of different sizes.

Expected Results

  1. Plover should render all windows as normal.

Actual Results

  1. Plover has large black panes on some or all of its windows. Here's an example:

screen shot 2017-02-28 at 10 38 12 am

Here's my plover.log from yesterday and today:

2017-02-25 11:04:46,817 [MainThread] INFO: Mac keyboard layout changed, updating
2017-02-26 10:46:51,643 [MainThread] INFO: Mac keyboard layout changed, updating
2017-02-27 09:32:00,726 [MainThread] INFO: Plover 4.0.0.dev0
2017-02-27 09:32:00,728 [MainThread] INFO: setting language to: en
2017-02-27 09:32:01,694 [Dummy-1] INFO: set_stroke_filename(/Users/waleedk/Dropbox (Personal)/plover/strokes.log)
2017-02-27 09:32:01,695 [Dummy-1] INFO: enable_stroke_logging(True)
2017-02-27 09:32:01,695 [Dummy-1] INFO: enable_translation_logging(True)
2017-02-27 09:32:01,695 [Dummy-1] INFO: loading system: English Stenotype
2017-02-27 09:32:02,431 [Dummy-1] INFO: setting machine: Keyboard
2017-02-28 08:55:59,093 [MainThread] INFO: Plover 4.0.0.dev0
2017-02-28 08:55:59,095 [MainThread] INFO: setting language to: en
2017-02-28 08:56:00,063 [Dummy-1] INFO: set_stroke_filename(/Users/waleedk/Dropbox (Personal)/plover/strokes.log)
2017-02-28 08:56:00,064 [Dummy-1] INFO: enable_stroke_logging(True)
2017-02-28 08:56:00,064 [Dummy-1] INFO: enable_translation_logging(True)
2017-02-28 08:56:00,064 [Dummy-1] INFO: loading system: English Stenotype
2017-02-28 08:56:00,802 [Dummy-1] INFO: setting machine: Keyboard
2017-02-28 10:39:05,836 [MainThread] INFO: Plover 4.0.0.dev0
2017-02-28 10:39:05,838 [MainThread] INFO: setting language to: en
2017-02-28 10:39:07,009 [Dummy-1] INFO: set_stroke_filename(/Users/waleedk/Dropbox (Personal)/plover/strokes.log)
2017-02-28 10:39:07,009 [Dummy-1] INFO: enable_stroke_logging(True)
2017-02-28 10:39:07,009 [Dummy-1] INFO: enable_translation_logging(True)
2017-02-28 10:39:07,009 [Dummy-1] INFO: loading system: English Stenotype
2017-02-28 10:39:07,787 [Dummy-1] INFO: setting machine: Keyboard

Version

Plover version 4.0.0.dev0, built from source at a736fb5f0184d5265c03a31c8127f8472182b2ff. It looks like most of the more recent changes have been about dropping Python 2 support, so I don't imagine they'll have fixed the issue.

This didn't use to happen on Plover 3.x with the old GUI.

Notes

Clicking the window repaints it correctly. Scrolling on the window without focusing it does not repaint the black parts of the window, although the scrolling works.

Configuration

OS X:

$ sw_vers
ProductName:    Mac OS X
ProductVersion: 10.12.3
BuildVersion:   16D32

I believe this also manifests on 10.11, but I can't confirm right now.

morinted commented 7 years ago

Have you checked the QT bug tracker? I'm on mobile at the moment and can't get a good look https://bugreports.qt.io/browse/QTBUG-48852?jql=text%20~%20 "Mac%20redraw"

On Feb 28, 2017 6:03 PM, "Waleed Khan" notifications@github.com wrote:

Classification: Bug

Reproducibility: Sometimes Summary

Switching displays causes black artifacts in the Plover windows. Steps to Reproduce

  1. Connect laptop to external monitor and shut laptop, so the only display being used is the monitor.
  2. Launch Plover.
  3. Disconnect laptop from external monitor.
  4. Open laptop again and look at any Plover window. It oftentimes has black artifacts.

The problem also manifests if I start with the laptop and go to the monitor. It's perhaps worth noting that the window will have moved, because the display are of different sizes. Expected Results

  1. Plover should render all windows as normal.

Actual Results

  1. Plover has large black panes on some or all of its windows. Here's an example:

[image: screen shot 2017-02-28 at 10 38 12 am] https://cloud.githubusercontent.com/assets/454057/23438482/e2c4d9b8-fdc6-11e6-8bac-3cddc4c40612.png

Here's my plover.log from yesterday and today:

2017-02-25 11:04:46,817 [MainThread] INFO: Mac keyboard layout changed, updating 2017-02-26 10:46:51,643 [MainThread] INFO: Mac keyboard layout changed, updating 2017-02-27 09:32:00,726 [MainThread] INFO: Plover 4.0.0.dev0 2017-02-27 09:32:00,728 [MainThread] INFO: setting language to: en 2017-02-27 09:32:01,694 [Dummy-1] INFO: set_stroke_filename(/Users/waleedk/Dropbox (Personal)/plover/strokes.log) 2017-02-27 09:32:01,695 [Dummy-1] INFO: enable_stroke_logging(True) 2017-02-27 09:32:01,695 [Dummy-1] INFO: enable_translation_logging(True) 2017-02-27 09:32:01,695 [Dummy-1] INFO: loading system: English Stenotype 2017-02-27 09:32:02,431 [Dummy-1] INFO: setting machine: Keyboard 2017-02-28 08:55:59,093 [MainThread] INFO: Plover 4.0.0.dev0 2017-02-28 08:55:59,095 [MainThread] INFO: setting language to: en 2017-02-28 08:56:00,063 [Dummy-1] INFO: set_stroke_filename(/Users/waleedk/Dropbox (Personal)/plover/strokes.log) 2017-02-28 08:56:00,064 [Dummy-1] INFO: enable_stroke_logging(True) 2017-02-28 08:56:00,064 [Dummy-1] INFO: enable_translation_logging(True) 2017-02-28 08:56:00,064 [Dummy-1] INFO: loading system: English Stenotype 2017-02-28 08:56:00,802 [Dummy-1] INFO: setting machine: Keyboard 2017-02-28 10:39:05,836 [MainThread] INFO: Plover 4.0.0.dev0 2017-02-28 10:39:05,838 [MainThread] INFO: setting language to: en 2017-02-28 10:39:07,009 [Dummy-1] INFO: set_stroke_filename(/Users/waleedk/Dropbox (Personal)/plover/strokes.log) 2017-02-28 10:39:07,009 [Dummy-1] INFO: enable_stroke_logging(True) 2017-02-28 10:39:07,009 [Dummy-1] INFO: enable_translation_logging(True) 2017-02-28 10:39:07,009 [Dummy-1] INFO: loading system: English Stenotype 2017-02-28 10:39:07,787 [Dummy-1] INFO: setting machine: Keyboard

Version

Plover version 4.0.0.dev0, built from source at a736fb5 https://github.com/openstenoproject/plover/commit/a736fb5f0184d5265c03a31c8127f8472182b2ff. It looks like most of the more recent changes have been about dropping Python 2 support, so I don't imagine they'll have fixed the issue.

This didn't use to happen on Plover 3.x with the old GUI. Notes

Clicking the window repaints it correctly. Scrolling on the window without focusing it does not repaint the black parts of the window, although the scrolling works. Configuration

OS X:

$ sw_vers ProductName: Mac OS X ProductVersion: 10.12.3 BuildVersion: 16D32

I believe this also manifests on 10.11, but I can't confirm right now.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/openstenoproject/plover/issues/704, or mute the thread https://github.com/notifications/unsubscribe-auth/AFkgSq1eX57DYS8J2q6rP6Z3YM73bUTnks5rhKfEgaJpZM4MPAO8 .

benoit-pierre commented 7 years ago

What's the version of PyQt5 / Qt5 you're currently using?

arxanas commented 7 years ago

@morinted That does look like a similar effect, but it seems to be uses the QGraphicsView class, which I don't see in the Plover codebase in a quick search.

@benoit-pierre PyQt==5.8. I believe it's installed from pip so I'm not sure exactly what version of Qt is bundled with it, or how that works.

Homebrew gives this information, which I'm not sure is relevant in light of above, and also it's not very consistent because it gives a version number that isn't reflected in the given path to Qt.

$ brew info qt
qt5: stable 5.8.0 (bottled), HEAD [keg-only]
Cross-platform application and UI framework
https://www.qt.io/
/usr/local/Cellar/qt5/5.7.0 (8,218 files, 326M)
  Poured from bottle on 2016-11-11 at 14:48:38
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/qt5.rb
benoit-pierre commented 6 years ago

Is that still an issue?

arxanas commented 6 years ago

I haven't seen it again since then. It might be that I upgraded my version of PyQt or something. I'll re-open if I encounter it again.