ReactOS 0.4.15-dev-7906-g1b85a5f
focus.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

HWND FASTCALL IntGetCaptureWindow (VOID)
 
HWND FASTCALL co_UserSetCapture (HWND hWnd)
 
BOOL FASTCALL IntReleaseCapture (VOID)
 
HWND FASTCALL IntGetThreadFocusWindow (VOID)
 
HWND APIENTRY IntGetCapture (VOID)
 
HWND FASTCALL UserGetActiveWindow (VOID)
 
BOOL FASTCALL co_IntMouseActivateWindow (PWND Window)
 
BOOL FASTCALL co_IntSetForegroundWindow (PWND Window)
 
BOOL FASTCALL co_IntSetForegroundWindowMouse (PWND Window)
 
BOOL FASTCALL co_IntSetActiveWindow (PWND, BOOL, BOOL, BOOL)
 
BOOL FASTCALL IntUserSetActiveWindow (PWND, BOOL, BOOL, BOOL)
 
BOOL FASTCALL UserSetActiveWindow (PWND Wnd)
 
BOOL FASTCALL IntLockSetForegroundWindow (UINT uLockCode)
 
BOOL FASTCALL IntAllowSetForegroundWindow (DWORD dwProcessId)
 
VOID FASTCALL IntActivateWindow (PWND, PTHREADINFO, HANDLE, DWORD)
 
BOOL FASTCALL IntDeactivateWindow (PTHREADINFO, HANDLE)
 
BOOL FASTCALL co_IntSetForegroundMessageQueue (PWND, PTHREADINFO, BOOL, DWORD)
 
VOID FASTCALL UpdateShellHook (PWND)
 
BOOL FASTCALL IntCheckFullscreen (PWND Window)
 

Variables

PUSER_MESSAGE_QUEUE gpqForeground
 
PUSER_MESSAGE_QUEUE gpqForegroundPrev
 
PTHREADINFO ptiLastInput
 

Function Documentation

◆ co_IntMouseActivateWindow()

BOOL FASTCALL co_IntMouseActivateWindow ( PWND  Window)

Definition at line 1250 of file focus.c.

1251{
1252 TRACE("Mouse Active\n");
1253 if (Wnd && (Wnd->ExStyle & WS_EX_NOACTIVATE))
1254 return TRUE;
1256}
#define TRUE
Definition: types.h:120
static BOOL FASTCALL co_IntSetForegroundAndFocusWindow(_In_opt_ PWND Wnd, _In_ BOOL MouseActivate, _In_ BOOL bFlash)
Definition: focus.c:924
#define TRACE(s)
Definition: solgame.cpp:4
#define WS_EX_NOACTIVATE
Definition: winuser.h:395

Referenced by co_IntProcessMouseMessage().

◆ co_IntSetActiveWindow()

BOOL FASTCALL co_IntSetActiveWindow ( PWND  ,
BOOL  ,
BOOL  ,
BOOL   
)

◆ co_IntSetForegroundMessageQueue()

BOOL FASTCALL co_IntSetForegroundMessageQueue ( PWND  ,
PTHREADINFO  ,
BOOL  ,
DWORD   
)

◆ co_IntSetForegroundWindow()

BOOL FASTCALL co_IntSetForegroundWindow ( PWND  Window)

◆ co_IntSetForegroundWindowMouse()

BOOL FASTCALL co_IntSetForegroundWindowMouse ( PWND  Window)

Definition at line 1560 of file focus.c.

1561{
1563
1565}

Referenced by NC_HandleNCLButtonDown(), NtUserCallHwndLock(), and NtUserCallTwoParam().

◆ co_UserSetCapture()

HWND FASTCALL co_UserSetCapture ( HWND  hWnd)

These are HACKS!

Definition at line 1457 of file focus.c.

1458{
1459 PTHREADINFO pti;
1460 PUSER_MESSAGE_QUEUE ThreadQueue;
1461 PWND pWnd, Window = NULL;
1462 HWND hWndPrev;
1463
1465 ThreadQueue = pti->MessageQueue;
1466
1467 if (ThreadQueue->QF_flags & QF_CAPTURELOCKED)
1468 return NULL;
1469
1470 if (hWnd && (Window = UserGetWindowObject(hWnd)))
1471 {
1472 if (Window->head.pti->MessageQueue != ThreadQueue)
1473 {
1474 ERR("Window Thread does not match Current!\n");
1475 return NULL;
1476 }
1477 }
1478
1479 hWndPrev = MsqSetStateWindow(pti, MSQ_STATE_CAPTURE, hWnd);
1480
1481 if (hWndPrev)
1482 {
1483 pWnd = UserGetWindowObject(hWndPrev);
1484 if (pWnd)
1485 IntNotifyWinEvent(EVENT_SYSTEM_CAPTUREEND, pWnd, OBJID_WINDOW, CHILDID_SELF, WEF_SETBYWNDPTI);
1486 }
1487
1488 if (Window)
1489 IntNotifyWinEvent(EVENT_SYSTEM_CAPTURESTART, Window, OBJID_WINDOW, CHILDID_SELF, WEF_SETBYWNDPTI);
1490
1491 //
1492 // Only send the message if we have a previous Window!
1493 // Fix msg_menu tracking popup menu and win test_capture_4!!!!
1494 //
1495 if (hWndPrev)
1496 {
1497 if (ThreadQueue->MenuOwner && Window) ThreadQueue->QF_flags |= QF_CAPTURELOCKED;
1498
1500
1501 ThreadQueue->QF_flags &= ~QF_CAPTURELOCKED;
1502 }
1503
1504 if (hWnd == NULL) // Release mode.
1505 {
1506 MOUSEINPUT mi;
1508 /* Also remove other windows if not capturing anymore */
1512 /* Somebody may have missed some mouse movements */
1513 mi.dx = 0;
1514 mi.dy = 0;
1515 mi.mouseData = 0;
1517 mi.time = 0;
1518 mi.dwExtraInfo = 0;
1520 }
1521 return hWndPrev;
1522}
HWND hWnd
Definition: settings.c:17
#define ERR(fmt,...)
Definition: debug.h:110
#define NULL
Definition: types.h:112
#define MSQ_STATE_MOVESIZE
Definition: ntuser.h:3585
#define MSQ_STATE_CAPTURE
Definition: ntuser.h:3581
#define MSQ_STATE_MENUOWNER
Definition: ntuser.h:3584
#define WEF_SETBYWNDPTI
Definition: ntuser.h:236
HWND FASTCALL MsqSetStateWindow(PTHREADINFO pti, ULONG Type, HWND hWnd)
Definition: msgqueue.c:2495
#define QF_CAPTURELOCKED
Definition: msgqueue.h:111
PVOID NTAPI PsGetCurrentThreadWin32Thread(VOID)
Definition: thread.c:805
struct _USER_MESSAGE_QUEUE * MessageQueue
Definition: win32.h:89
Definition: ntuser.h:694
DWORD dwFlags
Definition: winuser.h:3787
PWND FASTCALL UserGetWindowObject(HWND hWnd)
Definition: window.c:122
VOID FASTCALL IntNotifyWinEvent(DWORD Event, PWND pWnd, LONG idObject, LONG idChild, DWORD flags)
Definition: event.c:178
BOOL NTAPI UserSendMouseInput(MOUSEINPUT *pMouseInput, BOOL bInjected)
Definition: mouse.c:168
LRESULT FASTCALL co_IntSendMessage(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
Definition: message.c:1445
static MONITORINFO mi
Definition: win.c:7338
#define OBJID_WINDOW
Definition: winable.h:15
#define CHILDID_SELF
Definition: winable.h:14
LONG_PTR LPARAM
Definition: windef.h:208
#define WM_CAPTURECHANGED
Definition: winuser.h:1808
#define MOUSEEVENTF_MOVE
Definition: winuser.h:1183

Referenced by DefWndDoSizeMove(), IntReleaseCapture(), IntTrackPopupMenuEx(), MENU_DoNextMenu(), MENU_InitTracking(), MENU_TrackMenu(), NC_DoButton(), NC_HandleNCRButtonDown(), NtUserDragDetect(), and NtUserSetCapture().

◆ IntActivateWindow()

VOID FASTCALL IntActivateWindow ( PWND  Wnd,
PTHREADINFO  pti,
HANDLE  tid,
DWORD  Type 
)

Definition at line 357 of file focus.c.

358{
361
362 if (Wnd)
363 {
364 Wnd = VerifyWnd(Wnd);
365
366 if (!Wnd) return;
367
368 UserRefObjectCo(Wnd, &Ref);
369
370 if (!gpqForeground)
371 {
372 // No foreground queue set.
374 }
375 else
376 {
377 // Same Active and Wnd.
378 if ( pmq->spwndActive == Wnd )
379 {
380 WPARAM wParam = (Wnd->head.pti->MessageQueue == gpqForeground);
381
383
384 if (wParam)
385 {
386 UpdateShellHook(Wnd);
387
389 }
390 }
391 else // Not the same, set the active Wnd.
392 {
394 }
395 }
397 }
398 else // Handle no Wnd!
399 {
400 if ( tid && // TID,
401 pmq->spwndActive && // Active WND not zero,
402 gpqForeground == pmq ) // Same message queues.
403 {
404 Wnd = pmq->spwndActive; // Use active window from current queue.
405
406 UserRefObjectCo(Wnd, &Ref);
407
409
410 UpdateShellHook(Wnd);
411
413
415 }
416 else if (gpqForeground != pmq)
417 {
418 // Not the same message queue so clear flags for foreground switching.
419 pti->TIF_flags &= ~TIF_ALLOWFOREGROUNDACTIVATE;
420 pti->ppi->W32PF_flags &= ~W32PF_ALLOWFOREGROUNDACTIVATE;
421 }
422 }
423}
Type
Definition: Type.h:7
WPARAM wParam
Definition: combotst.c:138
unsigned int BOOL
Definition: ntddk_ex.h:94
PUSER_MESSAGE_QUEUE gpqForeground
Definition: focus.c:13
VOID FASTCALL UpdateShellHook(PWND Window)
Definition: focus.c:99
BOOL FASTCALL co_IntSetForegroundMessageQueue(_In_opt_ PWND Wnd, _In_ PTHREADINFO pti, _In_ BOOL MouseActivate, _In_ DWORD Type)
Definition: focus.c:767
BOOL FASTCALL co_IntSetActiveWindow(_In_ PWND Wnd, _In_ BOOL bMouse, _In_ BOOL bFocus, _In_ BOOL Async)
Definition: focus.c:1024
#define UserHMGetHandle(obj)
Definition: ntuser.h:230
static TfClientId tid
BOOLEAN FASTCALL co_WinPosSetWindowPos(PWND Window, HWND WndInsertAfter, INT x, INT y, INT cx, INT cy, UINT flags)
Definition: winpos.c:1786
static __inline VOID UserDerefObjectCo(PVOID obj)
Definition: object.h:40
static __inline VOID UserRefObjectCo(PVOID obj, PUSER_REFERENCE_ENTRY UserReferenceEntry)
Definition: object.h:27
PPROCESSINFO ppi
Definition: win32.h:88
FLONG TIF_flags
Definition: win32.h:95
Definition: object.h:4
THRDESKHEAD head
Definition: ntuser.h:695
PWND FASTCALL VerifyWnd(PWND pWnd)
Definition: window.c:86
UINT_PTR WPARAM
Definition: windef.h:207
#define SWP_NOMOVE
Definition: winuser.h:1244
#define SWP_NOSIZE
Definition: winuser.h:1245
#define WM_NCACTIVATE
Definition: winuser.h:1688
#define HWND_TOP
Definition: winuser.h:1207

Referenced by handle_internal_events().

◆ IntAllowSetForegroundWindow()

BOOL FASTCALL IntAllowSetForegroundWindow ( DWORD  dwProcessId)

Definition at line 1602 of file focus.c.

1603{
1604 PPROCESSINFO ppi, ppiCur;
1606
1607 ppi = NULL;
1608 if (dwProcessId != ASFW_ANY)
1609 {
1611 {
1613 return FALSE;
1614 }
1616 if (!ppi)
1617 {
1619 return FALSE;
1620 }
1621 }
1623 if (!CanForceFG(ppiCur))
1624 {
1627 return FALSE;
1628 }
1629 if (dwProcessId == ASFW_ANY)
1630 { // All processes will be enabled to set the foreground window.
1631 //ERR("ptiLastInput is CLEARED!!\n");
1633 }
1634 else
1635 { // Rule #3, last input event in force.
1636 ERR("ptiLastInput is SET!!\n");
1637 //ptiLastInput = ppi->ptiList; // See CORE-6384 & CORE-7030.
1639 }
1640 return TRUE;
1641}
#define UlongToHandle(ul)
Definition: basetsd.h:97
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define ERROR_ACCESS_DENIED
Definition: compat.h:97
BOOL FASTCALL CanForceFG(PPROCESSINFO ppi)
Definition: focus.c:749
PTHREADINFO ptiLastInput
Definition: focus.c:18
_Must_inspect_result_ _In_ PLARGE_INTEGER _In_ PLARGE_INTEGER _In_ ULONG _In_ PFILE_OBJECT _In_ PVOID Process
Definition: fsrtlfuncs.h:223
PVOID NTAPI PsGetProcessWin32Process(PEPROCESS Process)
Definition: process.c:1193
NTSTATUS NTAPI PsLookupProcessByProcessId(IN HANDLE ProcessId, OUT PEPROCESS *Process)
Definition: process.c:919
PVOID NTAPI PsGetCurrentProcessWin32Process(VOID)
Definition: process.c:1183
ENGAPI VOID APIENTRY EngSetLastError(_In_ ULONG iError)
Definition: error.c:22
#define ObDereferenceObject
Definition: obfuncs.h:203

Referenced by NtUserCallOneParam().

◆ IntCheckFullscreen()

BOOL FASTCALL IntCheckFullscreen ( PWND  Window)

Definition at line 79 of file focus.c.

80{
81 HWND hWnd;
82
85
87 return FALSE;
88
91 {
94 }
95 return TRUE;
96}
#define ValidateHwndNoErr(hwnd)
Definition: precomp.h:84
HWND ghwndOldFullscreen
Definition: focus.c:19
BOOL FASTCALL IntIsWindowFullscreen(PWND Window)
Definition: focus.c:53
VOID co_IntShellHookNotify(WPARAM Message, WPARAM wParam, LPARAM lParam)
Definition: desktop.c:1692
#define HSHELL_RUDEAPPACTIVATED
Definition: winuser.h:1281

Referenced by co_WinPosSetWindowPos(), and UpdateShellHook().

◆ IntDeactivateWindow()

BOOL FASTCALL IntDeactivateWindow ( PTHREADINFO  pti,
HANDLE  tid 
)

Definition at line 191 of file focus.c.

192{
194 PTHREADINFO ptiPrev;
195 PWND pwndPrev;
196 BOOL InAAPM = FALSE;
198
199 if ( !pti->MessageQueue->spwndActive )
200 {
201 TRACE("IDAW E : Nothing to do, Active is NULL! pti 0x%p tid 0x%p\n",pti,tid);
202 return TRUE;
203 }
204
205 TRACE("IDAW : pti 0x%p tid 0x%p\n",pti,tid);
206
207 if (ptiCurrent != pti)
208 {
210 IntReferenceThreadInfo(ptiCurrent);
211 }
212
213 if (!(pti->TIF_flags & TIF_INACTIVATEAPPMSG) )
214 {
216 InAAPM = TRUE;
217 }
218
219 //
220 // Check for Capture and release it.
221 //
222 if ( pti->MessageQueue->spwndCapture )
223 {
224 MSG msg;
225 PWND pwndCapture = pti->MessageQueue->spwndCapture;
226
227 UserRefObjectCo(pwndCapture, &Ref);
229 UserDerefObjectCo(pwndCapture);
230
231 /* Generate mouse move message */
232 msg.message = WM_MOUSEMOVE;
233 msg.wParam = UserGetMouseButtonsState();
234 msg.lParam = MAKELPARAM(gpsi->ptCursor.x, gpsi->ptCursor.y);
235 msg.pt = gpsi->ptCursor;
237 }
238
239 //
240 // Check for Active and release it.
241 //
242 if ( pti->MessageQueue->spwndActive )
243 {
244 pwndPrev = pti->MessageQueue->spwndActive;
245 ptiPrev = pwndPrev->head.pti;
246
248 {
249 if (InAAPM) pti->TIF_flags &= ~TIF_INACTIVATEAPPMSG;
250 if (ptiCurrent != pti)
251 {
253 IntDereferenceThreadInfo(ptiCurrent);
254 }
255 return FALSE;
256 }
257
258 if ( pti->MessageQueue->spwndActive == pwndPrev )
259 {
260 pti->MessageQueue->spwndActivePrev = pwndPrev;
261 pti->MessageQueue->spwndActive = NULL;
262 }
263
264 if (ptiPrev->TIF_flags & TIF_INCLEANUP) ptiPrev = NULL;
265 }
266 else
267 {
268 ptiPrev = pti;
269 pwndPrev = (PWND)-1; // Avoid zero Active window.
270 }
271
272 if ( ptiPrev )
273 {
274 HANDLE OldTID = PsGetThreadId(ptiPrev->pEThread);
275 PWND cWindow;
276 HWND *List, *phWnd;
277
279 if ( List )
280 {
281 if ( OldTID )
282 {
283 for (phWnd = List; *phWnd; ++phWnd)
284 {
285 cWindow = ValidateHwndNoErr(*phWnd);
286 if ( cWindow && cWindow->head.pti == ptiPrev )
287 { // FALSE if the window is being deactivated,
288 // ThreadId that owns the window being activated.
289 //ERR("IDW : WM_ACTIVATEAPP(0) hwnd %p tid Old %p New %p\n",UserHMGetHandle(cWindow),OldTID,tid);
290 UserRefObjectCo(cWindow, &Ref);
292 UserDerefObjectCo(cWindow);
293 }
294 }
295 }
297 }
298 }
299
300 //
301 // Now check for a change (Bounce), if Active same as previous window, release it too.
302 //
303 if ( pti->MessageQueue->spwndActive == pwndPrev )
304 {
306 {
307 if (InAAPM) pti->TIF_flags &= ~TIF_INACTIVATEAPPMSG;
308 if (ptiCurrent != pti)
309 {
311 IntDereferenceThreadInfo(ptiCurrent);
312 }
313 return FALSE;
314 }
315
316 if ( pti->MessageQueue->spwndActive == pwndPrev )
317 {
318 pti->MessageQueue->spwndActivePrev = pwndPrev;
319 pti->MessageQueue->spwndActive = NULL;
320 }
321 }
322
323 //
324 // Check for Focus and release it.
325 //
326 if ( pti->MessageQueue->spwndFocus )
327 {
328 PWND pwndFocus = pti->MessageQueue->spwndFocus;
329
330 //
331 // Fix win.c:test_SetForegroundWindow:SetActiveWindow(0)!
332 //
333 pti->MessageQueue->spwndFocus = NULL; // Null out Focus.
334
335 UserRefObjectCo(pwndFocus, &Ref);
337 if (IS_IMM_MODE())
338 {
340 }
341 UserDerefObjectCo(pwndFocus);
342 }
343
344 if (InAAPM) pti->TIF_flags &= ~TIF_INACTIVATEAPPMSG;
345 if (ptiCurrent != pti)
346 {
348 IntDereferenceThreadInfo(ptiCurrent);
349 }
350 return TRUE;
351}
#define msg(x)
Definition: auth_time.c:54
PSERVERINFO gpsi
Definition: imm.c:18
BOOL FASTCALL co_IntSendDeactivateMessages(HWND hWndPrev, HWND hWnd, BOOL Clear)
Definition: focus.c:118
VOID IntFocusSetInputContext(PWND pWnd, BOOL bActivate, BOOL bCallback)
Definition: focus.c:150
#define TIF_INCLEANUP
Definition: ntuser.h:263
struct _WND * PWND
#define TIF_INACTIVATEAPPMSG
Definition: ntuser.h:272
#define IS_IMM_MODE()
Definition: ntuser.h:1209
#define ExFreePoolWithTag(_P, _T)
Definition: module.h:1109
VOID FASTCALL co_MsqInsertMouseMessage(MSG *Msg, DWORD flags, ULONG_PTR dwExtraInfo, BOOL Hook)
Definition: msgqueue.c:580
HANDLE NTAPI PsGetThreadId(IN PETHREAD Thread)
Definition: thread.c:705
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1829
_Must_inspect_result_ _In_ WDFCMRESLIST List
Definition: wdfresource.h:550
#define IntDereferenceThreadInfo(pti)
Definition: win32.h:171
#define IntReferenceThreadInfo(pti)
Definition: win32.h:166
PWND FASTCALL UserGetDesktopWindow(VOID)
Definition: desktop.c:1386
WORD FASTCALL UserGetMouseButtonsState(VOID)
Definition: mouse.c:22
#define USERTAG_WINDOWLIST
Definition: tags.h:298
HWND *FASTCALL IntWinListChildren(PWND Window)
Definition: window.c:274
#define MAKELPARAM(l, h)
Definition: winuser.h:4008
#define WM_CANCELMODE
Definition: winuser.h:1635
#define WM_MOUSEMOVE
Definition: winuser.h:1775
#define WM_ACTIVATEAPP
Definition: winuser.h:1632
#define WM_KILLFOCUS
Definition: winuser.h:1614

Referenced by co_IntSetForegroundMessageQueue(), and handle_internal_events().

◆ IntGetCapture()

HWND APIENTRY IntGetCapture ( VOID  )

Definition at line 1440 of file focus.c.

1441{
1442 PTHREADINFO pti;
1443 PUSER_MESSAGE_QUEUE ThreadQueue;
1444 HWND Ret;
1445
1446 TRACE("Enter IntGetCapture\n");
1447
1449 ThreadQueue = pti->MessageQueue;
1450 Ret = ((ThreadQueue && ThreadQueue->spwndCapture) ? UserHMGetHandle(ThreadQueue->spwndCapture) : NULL);
1451
1452 TRACE("Leave IntGetCapture, ret=%p\n", Ret);
1453 return Ret;
1454}

Referenced by DefWndDoSizeMove(), MENU_TrackMenu(), NC_HandleNCRButtonDown(), and NtUserGetThreadState().

◆ IntGetCaptureWindow()

HWND FASTCALL IntGetCaptureWindow ( VOID  )

Definition at line 34 of file focus.c.

35{
37 return ( ForegroundQueue ? (ForegroundQueue->spwndCapture ? UserHMGetHandle(ForegroundQueue->spwndCapture) : 0) : 0);
38}
PUSER_MESSAGE_QUEUE FASTCALL IntGetFocusMessageQueue(VOID)
Definition: desktop.c:1307

Referenced by co_IntTranslateAccelerator(), co_MsqInsertMouseMessage(), and IntDefWindowProc().

◆ IntGetThreadFocusWindow()

HWND FASTCALL IntGetThreadFocusWindow ( VOID  )

Definition at line 41 of file focus.c.

42{
43 PTHREADINFO pti;
44 PUSER_MESSAGE_QUEUE ThreadQueue;
45
47 ThreadQueue = pti->MessageQueue;
48 if (!ThreadQueue)
49 return NULL;
50 return ThreadQueue->spwndFocus ? UserHMGetHandle(ThreadQueue->spwndFocus) : 0;
51}

Referenced by IntEnableWindow(), and NtUserGetThreadState().

◆ IntLockSetForegroundWindow()

BOOL FASTCALL IntLockSetForegroundWindow ( UINT  uLockCode)

Definition at line 1571 of file focus.c.

1572{
1575 switch (uLockCode)
1576 {
1577 case LSFW_LOCK:
1578 if ( CanForceFG(ppi) && !gppiLockSFW )
1579 {
1580 gppiLockSFW = ppi;
1581 return TRUE;
1582 }
1583 break;
1584 case LSFW_UNLOCK:
1585 if ( gppiLockSFW == ppi)
1586 {
1587 gppiLockSFW = NULL;
1588 return TRUE;
1589 }
1590 break;
1591 default:
1593 }
1594 EngSetLastError(Err);
1595 return FALSE;
1596}
PPROCESSINFO gppiLockSFW
Definition: focus.c:16
uint32_t ULONG
Definition: typedefs.h:59

Referenced by NtUserCallOneParam().

◆ IntReleaseCapture()

BOOL FASTCALL IntReleaseCapture ( VOID  )

Definition at line 1529 of file focus.c.

1530{
1531 PTHREADINFO pti;
1532 PUSER_MESSAGE_QUEUE ThreadQueue;
1533
1535 ThreadQueue = pti->MessageQueue;
1536
1537 // Can not release inside WM_CAPTURECHANGED!!
1538 if (ThreadQueue->QF_flags & QF_CAPTURELOCKED) return FALSE;
1539
1541
1542 return TRUE;
1543}
HWND FASTCALL co_UserSetCapture(HWND hWnd)
Definition: focus.c:1457

Referenced by co_UserFreeWindow(), DefWndDoSizeMove(), IntDefWindowProc(), NC_DoButton(), NC_HandleNCRButtonDown(), and NtUserCallNoParam().

◆ IntUserSetActiveWindow()

BOOL FASTCALL IntUserSetActiveWindow ( PWND  ,
BOOL  ,
BOOL  ,
BOOL   
)

◆ UpdateShellHook()

VOID FASTCALL UpdateShellHook ( PWND  Window)

Definition at line 99 of file focus.c.

100{
102 return;
103
104 if ( Window->spwndParent == UserGetDesktopWindow() &&
105 (!(Window->ExStyle & WS_EX_TOOLWINDOW) ||
106 (Window->ExStyle & WS_EX_APPWINDOW)))
107 {
108 // FIXME lParam; The value is TRUE if the window is in full-screen mode, or FALSE otherwise.
109 co_IntShellHookNotify(HSHELL_WINDOWACTIVATED, (WPARAM) UserHMGetHandle(Window), FALSE);
110 }
111 else
112 {
113 co_IntShellHookNotify(HSHELL_WINDOWACTIVATED, 0, FALSE);
114 }
115}
BOOL FASTCALL IntCheckFullscreen(PWND Window)
Definition: focus.c:79
#define WS_EX_APPWINDOW
Definition: winuser.h:383
#define WS_EX_TOOLWINDOW
Definition: winuser.h:404

Referenced by co_IntSendActivateMessages(), co_IntSetForegroundMessageQueue(), co_WinPosSetWindowPos(), and IntActivateWindow().

◆ UserGetActiveWindow()

HWND FASTCALL UserGetActiveWindow ( VOID  )

Definition at line 1429 of file focus.c.

1430{
1431 PTHREADINFO pti;
1432 PUSER_MESSAGE_QUEUE ThreadQueue;
1433
1435 ThreadQueue = pti->MessageQueue;
1436 return( ThreadQueue ? (ThreadQueue->spwndActive ? UserHMGetHandle(ThreadQueue->spwndActive) : 0) : 0);
1437}

◆ UserSetActiveWindow()

BOOL FASTCALL UserSetActiveWindow ( PWND  Wnd)

Variable Documentation

◆ gpqForeground

◆ gpqForegroundPrev

◆ ptiLastInput

PTHREADINFO ptiLastInput
extern