Opened 6 years ago

Last modified 6 years ago

#243 new enhancement

Restore native widget mask support

Reported by: dmik Owned by:
Priority: major Milestone: Qt Enhanced
Component: General Version: 4.6.3
Severity: low Keywords:
Cc:

Description

Support for native widget masks was disabled with the QT_PM_NATIVEWIDGETMASK macro in r1034. See http://svn.netlabs.org/qt4/ticket/203#comment:31 for more details.

When we meet an application that requires this, we will have to find a solution.

Change History (3)

comment:1 Changed 6 years ago by dmik

The main problem is that by doing a custom qt_WinSetWindowPos() we loose WM_VRNENABLED/WM_VRNDISABLED notifications which is vital for some applications (like VLC).

Myung-Hun suggested to try the following as a solution:

WinLockWindowUpdate( HWND_DESKTOP, hwnd );
WinSetWindowPos( hwnd, hwndInsertBehind, x, y, cx, cy, fl );
WinSetWindowPos( hwnd, hwndInsertBehind, x, y, cx, cy, fl | SWP_NOREDRAW );
WinLockWindowUpdate( HWND_DESKTOP, NULLHANDLE );

comment:2 Changed 6 years ago by dmik

Actually, interesting idea. Most likely WinLockWindowUpdate?() takes into account the flags set with WinSetVisibleRegionNotify?() so that it should send WM_VRNENABLED to hwnd and all children interested in this message (and the second call should send them WM_VRNDISABLED).

However, I think that calling WinSetWindowPos?() with no SWP_NOREDRAW even while locked, will still create update/invalid regions in a way we don't want (this is what qt_WinSetWindowPos() is supposed to fix in the first place), so this call is wrong.

This needs testing.

comment:3 Changed 6 years ago by dmik

JFTR. Working on this task implies implementing QWidgetPrivate::setMask_sys() which is a no-op now. It's easy though (look at the relevant Qt3 function).

Note: See TracTickets for help on using tickets.