ReactOS 0.4.15-dev-8064-gdaf8068
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 1253 of file focus.c.

1254{
1255 TRACE("Mouse Active\n");
1256 if (Wnd && (Wnd->ExStyle & WS_EX_NOACTIVATE))
1257 return TRUE;
1259}
#define TRUE
Definition: types.h:120
static BOOL FASTCALL co_IntSetForegroundAndFocusWindow(_In_opt_ PWND Wnd, _In_ BOOL MouseActivate, _In_ BOOL bFlash)
Definition: focus.c:927
#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 1563 of file focus.c.

1564{
1566
1568}

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

◆ co_UserSetCapture()

HWND FASTCALL co_UserSetCapture ( HWND  hWnd)

These are HACKS!

Definition at line 1460 of file focus.c.

1461{
1462 PTHREADINFO pti;
1463 PUSER_MESSAGE_QUEUE ThreadQueue;
1464 PWND pWnd, Window = NULL;
1465 HWND hWndPrev;
1466
1468 ThreadQueue = pti->MessageQueue;
1469
1470 if (ThreadQueue->QF_flags & QF_CAPTURELOCKED)
1471 return NULL;
1472
1473 if (hWnd && (Window = UserGetWindowObject(hWnd)))
1474 {
1475 if (Window->head.pti->MessageQueue != ThreadQueue)
1476 {
1477 ERR("Window Thread does not match Current!\n");
1478 return NULL;
1479 }
1480 }
1481
1482 hWndPrev = MsqSetStateWindow(pti, MSQ_STATE_CAPTURE, hWnd);
1483
1484 if (hWndPrev)
1485 {
1486 pWnd = UserGetWindowObject(hWndPrev);
1487 if (pWnd)
1488 IntNotifyWinEvent(EVENT_SYSTEM_CAPTUREEND, pWnd, OBJID_WINDOW, CHILDID_SELF, WEF_SETBYWNDPTI);
1489 }
1490
1491 if (Window)
1492 IntNotifyWinEvent(EVENT_SYSTEM_CAPTURESTART, Window, OBJID_WINDOW, CHILDID_SELF, WEF_SETBYWNDPTI);
1493
1494 //
1495 // Only send the message if we have a previous Window!
1496 // Fix msg_menu tracking popup menu and win test_capture_4!!!!
1497 //
1498 if (hWndPrev)
1499 {
1500 if (ThreadQueue->MenuOwner && Window) ThreadQueue->QF_flags |= QF_CAPTURELOCKED;
1501
1503
1504 ThreadQueue->QF_flags &= ~QF_CAPTURELOCKED;
1505 }
1506
1507 if (hWnd == NULL) // Release mode.
1508 {
1509 MOUSEINPUT mi;
1511 /* Also remove other windows if not capturing anymore */
1515 /* Somebody may have missed some mouse movements */
1516 mi.dx = 0;
1517 mi.dy = 0;
1518 mi.mouseData = 0;
1520 mi.time = 0;
1521 mi.dwExtraInfo = 0;
1523 }
1524 return hWndPrev;
1525}
HWND hWnd
Definition: settings.c:17
#define ERR(fmt,...)
Definition: debug.h:113
#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:2501
#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 360 of file focus.c.

361{
364
365 if (Wnd)
366 {
367 Wnd = VerifyWnd(Wnd);
368
369 if (!Wnd) return;
370
371 UserRefObjectCo(Wnd, &Ref);
372
373 if (!gpqForeground)
374 {
375 // No foreground queue set.
377 }
378 else
379 {
380 // Same Active and Wnd.
381 if ( pmq->spwndActive == Wnd )
382 {
383 WPARAM wParam = (Wnd->head.pti->MessageQueue == gpqForeground);
384
386
387 if (wParam)
388 {
389 UpdateShellHook(Wnd);
390
392 }
393 }
394 else // Not the same, set the active Wnd.
395 {
397 }
398 }
400 }
401 else // Handle no Wnd!
402 {
403 if ( tid && // TID,
404 pmq->spwndActive && // Active WND not zero,
405 gpqForeground == pmq ) // Same message queues.
406 {
407 Wnd = pmq->spwndActive; // Use active window from current queue.
408
409 UserRefObjectCo(Wnd, &Ref);
410
412
413 UpdateShellHook(Wnd);
414
416
418 }
419 else if (gpqForeground != pmq)
420 {
421 // Not the same message queue so clear flags for foreground switching.
422 pti->TIF_flags &= ~TIF_ALLOWFOREGROUNDACTIVATE;
423 pti->ppi->W32PF_flags &= ~W32PF_ALLOWFOREGROUNDACTIVATE;
424 }
425 }
426}
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:770
BOOL FASTCALL co_IntSetActiveWindow(_In_ PWND Wnd, _In_ BOOL bMouse, _In_ BOOL bFocus, _In_ BOOL Async)
Definition: focus.c:1027
#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 1605 of file focus.c.

1606{
1607 PPROCESSINFO ppi, ppiCur;
1609
1610 ppi = NULL;
1611 if (dwProcessId != ASFW_ANY)
1612 {
1614 {
1616 return FALSE;
1617 }
1619 if (!ppi)
1620 {
1622 return FALSE;
1623 }
1624 }
1626 if (!CanForceFG(ppiCur))
1627 {
1630 return FALSE;
1631 }
1632 if (dwProcessId == ASFW_ANY)
1633 { // All processes will be enabled to set the foreground window.
1634 //ERR("ptiLastInput is CLEARED!!\n");
1636 }
1637 else
1638 { // Rule #3, last input event in force.
1639 ERR("ptiLastInput is SET!!\n");
1640 //ptiLastInput = ppi->ptiList; // See CORE-6384 & CORE-7030.
1642 }
1643 return TRUE;
1644}
#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:752
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 /* Check for keyboard modifiers and release them (CORE-14768) */
346
347 if (InAAPM) pti->TIF_flags &= ~TIF_INACTIVATEAPPMSG;
348 if (ptiCurrent != pti)
349 {
351 IntDereferenceThreadInfo(ptiCurrent);
352 }
353 return TRUE;
354}
#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 MsqReleaseModifierKeys(PUSER_MESSAGE_QUEUE MessageQueue)
Definition: msgqueue.c:2540
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 1443 of file focus.c.

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

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 1574 of file focus.c.

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

Referenced by NtUserCallOneParam().

◆ IntReleaseCapture()

BOOL FASTCALL IntReleaseCapture ( VOID  )

Definition at line 1532 of file focus.c.

1533{
1534 PTHREADINFO pti;
1535 PUSER_MESSAGE_QUEUE ThreadQueue;
1536
1538 ThreadQueue = pti->MessageQueue;
1539
1540 // Can not release inside WM_CAPTURECHANGED!!
1541 if (ThreadQueue->QF_flags & QF_CAPTURELOCKED) return FALSE;
1542
1544
1545 return TRUE;
1546}
HWND FASTCALL co_UserSetCapture(HWND hWnd)
Definition: focus.c:1460

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 1432 of file focus.c.

1433{
1434 PTHREADINFO pti;
1435 PUSER_MESSAGE_QUEUE ThreadQueue;
1436
1438 ThreadQueue = pti->MessageQueue;
1439 return( ThreadQueue ? (ThreadQueue->spwndActive ? UserHMGetHandle(ThreadQueue->spwndActive) : 0) : 0);
1440}

◆ UserSetActiveWindow()

BOOL FASTCALL UserSetActiveWindow ( PWND  Wnd)

Variable Documentation

◆ gpqForeground

◆ gpqForegroundPrev

◆ ptiLastInput

PTHREADINFO ptiLastInput
extern