Electron windows causing repaint issues when DWM composition disabled
- Log on to a Windows 7 machine
- Switch your theme to Windows Basic or Windows Classic (this has the side-effect of disabling Aero's DWM composition)
- Launch an Electron app
- Switch to another app window
- The other window fails to repaint:
This occurs with almost every app that I've tried, so it seems like something funky with the Electron window. It may or may not require the presence of a webview tag; I haven't isolated that yet. Until now we've been advising users to switch to an Aero theme (this fixes the problem, but is undesirable for many).
Also an issue with any remote desktop session, since that typically disables DWM composition.
This is horrendous on a window sitting above outlook. The only real fix is to maximize and minimize slack, since there's so many panes in outlook you have to swirl your mouse pointer around in to clear the screen of repaint artifacts. Disabling gpu in both outlook and slack doesn't change anything either.
Sorry for the obfuscation in the images, I've provided extra to show the detail just in case.


replaced with https://github.com/rfgamaral/SlackUI - works flawlessly
@CharlieHess Does this happen for the default app? I tried with v0.29.1 on a fresh Window 7 image with basic theme, and the default app seems to work well.
@zcbenz I think it's exclusive to the webview tag.
+1 same issue when css animation used.
+1 Same problem with Slack.
+1, I just reported this to Slack and they said it's a bug in Electron. Switching to an Aero theme to work around this would suck. Thanks in advance to whoever's working on this!
@myself248 If you upgrade to any OS newer than Windows 7, you can enable Classic Theme and still not hit this bug. Highly encouraged!

Imprinting issue is reproducible here too, clicking (in the screenshot shown) on the cmd window, then slack, then drobo dashboard. Happens about 1 time in 4. Win7, non-Aero theme, Nvidia NVS 5400M driver version 345.35.
Just as soon as any OS newer than 7 (I note that you don't say "better than") gets the thumbs-up from corporate IT, I'll have a workaround! :)

Got a new and hilarious manifestation: sometimes when switching back to the window, it's drawn without borders. I can just alt-tab back and forth between Spotify and Slack a dozen times, and 1 or 2 of those times, Slack is drawn without a title bar or window borders, as seen here.
Interestingly enough, if I click where the title bar should be, I can move the window. And if I hover over where borders and corners should be, I get the resize cursor, and I can drag to resize the window. After that operation, the window is redrawn completely, 100% of the time.
I'm seeing an issue on Windows 7 where updating the title bar doesn't cause a repaint of the title bar. (I think it's the same problem this person is seeing: https://discuss.atom.io/t/title-bar-doesnt-update-when-switching-tabs/16429) The correct title is shown if I hover over the icon in the taskbar, and resizing the window makes it repaint. Two questions:
- Is this the same issue being described here, or should I create a new issue?
- Is there a workaround I can use to force a title bar repaint?
- Yes it should be the same issue. If you want you can verify this by changing to the default Windows 7 theme and testing the repaint of the title bar.
Confirmed: When I changed the theme, it solved the problem. Unfortunately, I can't tell my users to change their theme, so is there any other workaround I could implement in my code?
Are there any Electron developers who can comment on this issue? If this is not going to be fixed, that would be good to know so we can make alternate arrangements.
This has been open for over a year and the issue is fairly serious for the affected users (a not insignificant number of people).
None of the Electron developers are working on this, but will accept a PR for it
We need to use transparent BrowserWindows in our application. This doesn't work with certain Windows settings. But we're able to detect these settings and show a warning to the user with instructions to fix it. We detect it by checking the Registry for certain values:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CompositionPolicy should be 2
HKEY_CURRENT_USER\Software\Microsoft\Windows\Composition should be 1
I'm having same issue with title-bar text not update until you click off app and back on or refresh or close window etc. Unless I change the theme, then it works fine but that's not a practical solution because i can't tell customers to change their theme
Considering using Electron for a new project but this issue would be the show stopper as a significant number of our users will have Windows 7.
Experiencing this issue with current 1.14.0 beta 0 still. (Win7x64, AMD) Re-enabled Aero and problem goes away, but that is not a solution/fix.