Old 02-07-2017, 03:53 PM   #1
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 2,541
Default WndSize, missed redraws and isOpaque in SWELL

I'm using WDL's WndSize to scale the content of my windows, however on macOS with vanilla WDL it does not redraw properly after a sudden change of size:



It appears to be caused by this condition in swell-dlg.mm at line 1750, added in 2010:
Code:
if ([hc isOpaque]) InvalidateRect((HWND)hc,NULL,FALSE); \
isOpaque (m_isopaque) seems to be always false unless mac_resgen.php adds SWELL_DLG_WS_OPAQUE which it only does if there is absolutely nothing in the resource file between BEGIN and END... (?!)

After removing that condition it's not perfect, but much better (patch I've been using):



I'm not sure if that fix is right because I have no idea what isOpaque is supposed to be for and it still takes some time before the controls get drawn at the correct position after a fast resize.

What is the intended usage of that test/isOpaque/SWELL_DLG_WS_OPAQUE? Is there a better way to fix the redraw problem of the first gif (there was a similar issue in REAPER prior to v5.21)?

Last edited by cfillion; 02-08-2017 at 01:17 AM.
cfillion is online now   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 10:40 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.