Fix T90110: Dupli Window Not Immediately Active
When creating a new window from a duplicated area - by shift-dragging on corner action zones - on the Windows platform the resulting window is initially unresponsive. This patch fixes this by releasing the parent window's mouse capture. See D14085 for more details. Differential Revision: https://developer.blender.org/D14085 Reviewed by Ray Molenkamp
This commit is contained in:
parent
dcb520a7af
commit
db4d5d1583
Notes:
blender-bot
2023-02-13 23:16:02 +01:00
Referenced by issue #90110, [Shift]+mouse drag duplicated window are not immediately active
|
@ -151,6 +151,12 @@ GHOST_WindowWin32::GHOST_WindowWin32(GHOST_SystemWin32 *system,
|
|||
::SetWindowPos(m_hWnd, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
|
||||
}
|
||||
|
||||
if (parentwindow) {
|
||||
/* Release any parent capture to allow immediate interaction (T90110). */
|
||||
::ReleaseCapture();
|
||||
parentwindow->lostMouseCapture();
|
||||
}
|
||||
|
||||
/* Show the window. */
|
||||
int nCmdShow;
|
||||
switch (state) {
|
||||
|
|
|
@ -206,9 +206,7 @@ class GHOST_WindowWin32 : public GHOST_Window {
|
|||
GHOST_TSuccess endProgressBar();
|
||||
|
||||
/**
|
||||
* Register a mouse capture state (should be called
|
||||
* for any real button press, controls mouse
|
||||
* capturing).
|
||||
* Set or Release mouse capture (should be called for any real button press).
|
||||
*
|
||||
* \param event: Whether mouse was pressed and released,
|
||||
* or an operator grabbed or ungrabbed the mouse.
|
||||
|
@ -216,8 +214,9 @@ class GHOST_WindowWin32 : public GHOST_Window {
|
|||
void updateMouseCapture(GHOST_MouseCaptureEventWin32 event);
|
||||
|
||||
/**
|
||||
* Inform the window that it has lost mouse capture,
|
||||
* called in response to native window system messages.
|
||||
* Inform the window that it has lost mouse capture, called in response to native window system
|
||||
* messages (WA_INACTIVE, WM_CAPTURECHANGED) or if ReleaseCapture() is explicitly called (for new
|
||||
* window creation).
|
||||
*/
|
||||
void lostMouseCapture();
|
||||
|
||||
|
|
Loading…
Reference in New Issue