ReactOS 0.4.17-dev-117-g313be0c
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 1249 of file focus.c.

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

1557{
1559
1561}

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

◆ co_UserSetCapture()

HWND FASTCALL co_UserSetCapture ( HWND  hWnd)

These are HACKS!

Definition at line 1453 of file focus.c.

1454{
1455 PTHREADINFO pti;
1456 PUSER_MESSAGE_QUEUE ThreadQueue;
1457 PWND pWnd, Window = NULL;
1458 HWND hWndPrev;
1459
1461 ThreadQueue = pti->MessageQueue;
1462
1463 if (ThreadQueue->QF_flags & QF_CAPTURELOCKED)
1464 return NULL;
1465
1466 if (hWnd && (Window = UserGetWindowObject(hWnd)))
1467 {
1468 if (Window->head.pti->MessageQueue != ThreadQueue)
1469 {
1470 ERR("Window Thread does not match Current!\n");
1471 return NULL;
1472 }
1473 }
1474
1475 hWndPrev = MsqSetStateWindow(pti, MSQ_STATE_CAPTURE, hWnd);
1476
1477 if (hWndPrev)
1478 {
1479 pWnd = UserGetWindowObject(hWndPrev);
1480 if (pWnd)
1481 IntNotifyWinEvent(EVENT_SYSTEM_CAPTUREEND, pWnd, OBJID_WINDOW, CHILDID_SELF, WEF_SETBYWNDPTI);
1482 }
1483
1484 if (Window)
1485 IntNotifyWinEvent(EVENT_SYSTEM_CAPTURESTART, Window, OBJID_WINDOW, CHILDID_SELF, WEF_SETBYWNDPTI);
1486
1487 //
1488 // Only send the message if we have a previous Window!
1489 // Fix msg_menu tracking popup menu and win test_capture_4!!!!
1490 //
1491 if (hWndPrev)
1492 {
1493 if (ThreadQueue->MenuOwner && Window) ThreadQueue->QF_flags |= QF_CAPTURELOCKED;
1494
1496
1497 ThreadQueue->QF_flags &= ~QF_CAPTURELOCKED;
1498 }
1499
1500 if (hWnd == NULL) // Release mode.
1501 {
1502 MOUSEINPUT mi;
1504 /* Also remove other windows if not capturing anymore */
1508 /* Somebody may have missed some mouse movements */
1509 mi.dx = 0;
1510 mi.dy = 0;
1511 mi.mouseData = 0;
1513 mi.time = 0;
1514 mi.dwExtraInfo = 0;
1516 }
1517 return hWndPrev;
1518}
HWND hWnd
Definition: settings.c:17
#define ERR(fmt,...)
Definition: precomp.h:57
#define NULL
Definition: types.h:112
#define MSQ_STATE_MOVESIZE
Definition: ntuser.h:3613
#define MSQ_STATE_CAPTURE
Definition: ntuser.h:3609
#define MSQ_STATE_MENUOWNER
Definition: ntuser.h:3612
#define WEF_SETBYWNDPTI
Definition: ntuser.h:236
LONG_PTR LPARAM
Definition: minwindef.h:175
static MONITORINFO mi
Definition: win.c:9400
HWND FASTCALL MsqSetStateWindow(PTHREADINFO pti, ULONG Type, HWND hWnd)
Definition: msgqueue.c:2507
#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:3895
PWND FASTCALL UserGetWindowObject(HWND hWnd)
Definition: window.c:123
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:1495
#define OBJID_WINDOW
Definition: winable.h:15
#define CHILDID_SELF
Definition: winable.h:14
#define WM_CAPTURECHANGED
Definition: winuser.h:1836
#define MOUSEEVENTF_MOVE
Definition: winuser.h:1194

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:98
BOOL FASTCALL co_IntSetForegroundMessageQueue(_In_opt_ PWND Wnd, _In_ PTHREADINFO pti, _In_ BOOL MouseActivate, _In_ DWORD Type)
Definition: focus.c:766
BOOL FASTCALL co_IntSetActiveWindow(_In_ PWND Wnd, _In_ BOOL bMouse, _In_ BOOL bFocus, _In_ BOOL Async)
Definition: focus.c:1023
#define UserHMGetHandle(obj)
Definition: ntuser.h:230
static TfClientId tid
UINT_PTR WPARAM
Definition: minwindef.h:174
BOOLEAN FASTCALL co_WinPosSetWindowPos(PWND Window, HWND WndInsertAfter, INT x, INT y, INT cx, INT cy, UINT flags)
Definition: winpos.c:1792
static __inline VOID UserDerefObjectCo(PVOID obj)
Definition: object.h:43
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:88
#define SWP_NOMOVE
Definition: winuser.h:1255
#define SWP_NOSIZE
Definition: winuser.h:1256
#define WM_NCACTIVATE
Definition: winuser.h:1716
#define HWND_TOP
Definition: winuser.h:1218

Referenced by handle_internal_events().

◆ IntAllowSetForegroundWindow()

BOOL FASTCALL IntAllowSetForegroundWindow ( DWORD  dwProcessId)

Definition at line 1598 of file focus.c.

1599{
1600 PPROCESSINFO ppi, ppiCur;
1602
1603 ppi = NULL;
1604 if (dwProcessId != ASFW_ANY)
1605 {
1607 {
1609 return FALSE;
1610 }
1612 if (!ppi)
1613 {
1615 return FALSE;
1616 }
1617 }
1619 if (!CanForceFG(ppiCur))
1620 {
1623 return FALSE;
1624 }
1625 if (dwProcessId == ASFW_ANY)
1626 { // All processes will be enabled to set the foreground window.
1627 //ERR("ptiLastInput is CLEARED!!\n");
1629 }
1630 else
1631 { // Rule #3, last input event in force.
1632 ERR("ptiLastInput is SET!!\n");
1633 //ptiLastInput = ppi->ptiList; // See CORE-6384 & CORE-7030.
1635 }
1636 return TRUE;
1637}
#define UlongToHandle(ul)
Definition: basetsd.h:91
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define ERROR_ACCESS_DENIED
Definition: compat.h:97
BOOL FASTCALL CanForceFG(PPROCESSINFO ppi)
Definition: focus.c:748
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
_In_ DWORD dwProcessId
Definition: shlwapi.h:193
ENGAPI VOID APIENTRY EngSetLastError(_In_ ULONG iError)
Definition: error.c:21
#define ObDereferenceObject
Definition: obfuncs.h:203

Referenced by NtUserCallOneParam().

◆ IntCheckFullscreen()

BOOL FASTCALL IntCheckFullscreen ( PWND  Window)

Definition at line 78 of file focus.c.

79{
80 HWND hWnd;
81
84
86 return FALSE;
87
90 {
93 }
94 return TRUE;
95}
HWND ghwndOldFullscreen
Definition: focus.c:19
BOOL FASTCALL IntIsWindowFullscreen(PWND Window)
Definition: focus.c:52
#define ValidateHwndNoErr(hwnd)
Definition: precomp.h:97
VOID co_IntShellHookNotify(WPARAM Message, WPARAM wParam, LPARAM lParam)
Definition: desktop.c:1704
#define HSHELL_RUDEAPPACTIVATED
Definition: winuser.h:1292

Referenced by co_WinPosSetWindowPos(), and UpdateShellHook().

◆ IntDeactivateWindow()

BOOL FASTCALL IntDeactivateWindow ( PTHREADINFO  pti,
HANDLE  tid 
)

Definition at line 188 of file focus.c.

189{
191 PTHREADINFO ptiPrev;
192 PWND pwndPrev;
193 BOOL InAAPM = FALSE;
195
196 if ( !pti->MessageQueue->spwndActive )
197 {
198 TRACE("IDAW E : Nothing to do, Active is NULL! pti 0x%p tid 0x%p\n",pti,tid);
199 return TRUE;
200 }
201
202 TRACE("IDAW : pti 0x%p tid 0x%p\n",pti,tid);
203
204 if (ptiCurrent != pti)
205 {
207 IntReferenceThreadInfo(ptiCurrent);
208 }
209
210 if (!(pti->TIF_flags & TIF_INACTIVATEAPPMSG) )
211 {
213 InAAPM = TRUE;
214 }
215
216 //
217 // Check for Capture and release it.
218 //
219 if ( pti->MessageQueue->spwndCapture )
220 {
221 MSG msg;
222 PWND pwndCapture = pti->MessageQueue->spwndCapture;
223
224 UserRefObjectCo(pwndCapture, &Ref);
226 UserDerefObjectCo(pwndCapture);
227
228 /* Generate mouse move message */
229 msg.message = WM_MOUSEMOVE;
230 msg.wParam = UserGetMouseButtonsState();
231 msg.lParam = MAKELPARAM(gpsi->ptCursor.x, gpsi->ptCursor.y);
232 msg.pt = gpsi->ptCursor;
234 }
235
236 //
237 // Check for Active and release it.
238 //
239 if ( pti->MessageQueue->spwndActive )
240 {
241 pwndPrev = pti->MessageQueue->spwndActive;
242 ptiPrev = pwndPrev->head.pti;
243
245 {
246 if (InAAPM) pti->TIF_flags &= ~TIF_INACTIVATEAPPMSG;
247 if (ptiCurrent != pti)
248 {
250 IntDereferenceThreadInfo(ptiCurrent);
251 }
252 return FALSE;
253 }
254
255 if ( pti->MessageQueue->spwndActive == pwndPrev )
256 {
257 pti->MessageQueue->spwndActivePrev = pwndPrev;
258 pti->MessageQueue->spwndActive = NULL;
259 }
260
261 if (ptiPrev->TIF_flags & TIF_INCLEANUP) ptiPrev = NULL;
262 }
263 else
264 {
265 ptiPrev = pti;
266 pwndPrev = (PWND)-1; // Avoid zero Active window.
267 }
268
269 if ( ptiPrev )
270 {
271 HANDLE OldTID = PsGetThreadId(ptiPrev->pEThread);
272 PWND cWindow;
273 HWND *List, *phWnd;
274
276 if ( List )
277 {
278 if ( OldTID )
279 {
280 for (phWnd = List; *phWnd; ++phWnd)
281 {
282 cWindow = ValidateHwndNoErr(*phWnd);
283 if ( cWindow && cWindow->head.pti == ptiPrev )
284 { // FALSE if the window is being deactivated,
285 // ThreadId that owns the window being activated.
286 //ERR("IDW : WM_ACTIVATEAPP(0) hwnd %p tid Old %p New %p\n",UserHMGetHandle(cWindow),OldTID,tid);
287 UserRefObjectCo(cWindow, &Ref);
289 UserDerefObjectCo(cWindow);
290 }
291 }
292 }
294 }
295 }
296
297 //
298 // Now check for a change (Bounce), if Active same as previous window, release it too.
299 //
300 if ( pti->MessageQueue->spwndActive == pwndPrev )
301 {
303 {
304 if (InAAPM) pti->TIF_flags &= ~TIF_INACTIVATEAPPMSG;
305 if (ptiCurrent != pti)
306 {
308 IntDereferenceThreadInfo(ptiCurrent);
309 }
310 return FALSE;
311 }
312
313 if ( pti->MessageQueue->spwndActive == pwndPrev )
314 {
315 pti->MessageQueue->spwndActivePrev = pwndPrev;
316 pti->MessageQueue->spwndActive = NULL;
317 }
318 }
319
320 //
321 // Check for Focus and release it.
322 //
323 if ( pti->MessageQueue->spwndFocus )
324 {
325 PWND pwndFocus = pti->MessageQueue->spwndFocus;
326
327 //
328 // Fix win.c:test_SetForegroundWindow:SetActiveWindow(0)!
329 //
330 pti->MessageQueue->spwndFocus = NULL; // Null out Focus.
331
332 UserRefObjectCo(pwndFocus, &Ref);
334 if (IS_IMM_MODE())
335 {
337 }
338 UserDerefObjectCo(pwndFocus);
339 }
340
341 /* Check for keyboard modifiers and release them (CORE-14768) */
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
BOOL FASTCALL co_IntSendDeactivateMessages(HWND hWndPrev, HWND hWnd, BOOL Clear)
Definition: focus.c:117
VOID IntFocusSetInputContext(PWND pWnd, BOOL bActivate, BOOL bCallback)
Definition: focus.c:148
PSERVERINFO gpsi
Definition: imm.c:18
#define TIF_INCLEANUP
Definition: ntuser.h:263
struct _WND * PWND
#define TIF_INACTIVATEAPPMSG
Definition: ntuser.h:272
#define IS_IMM_MODE()
Definition: ntuser.h:1212
#define ExFreePoolWithTag(_P, _T)
Definition: module.h:1109
VOID FASTCALL MsqReleaseModifierKeys(PUSER_MESSAGE_QUEUE MessageQueue)
Definition: msgqueue.c:2546
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:172
#define IntReferenceThreadInfo(pti)
Definition: win32.h:167
PWND FASTCALL UserGetDesktopWindow(VOID)
Definition: desktop.c:1402
WORD FASTCALL UserGetMouseButtonsState(VOID)
Definition: mouse.c:22
#define USERTAG_WINDOWLIST
Definition: tags.h:298
HWND *FASTCALL IntWinListChildren(PWND Window)
Definition: window.c:275
#define MAKELPARAM(l, h)
Definition: winuser.h:4116
#define WM_CANCELMODE
Definition: winuser.h:1663
#define WM_MOUSEMOVE
Definition: winuser.h:1803
#define WM_ACTIVATEAPP
Definition: winuser.h:1660
#define WM_KILLFOCUS
Definition: winuser.h:1642

Referenced by co_IntSetForegroundMessageQueue(), and handle_internal_events().

◆ IntGetCapture()

HWND APIENTRY IntGetCapture ( VOID  )

Definition at line 1436 of file focus.c.

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

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

◆ IntGetCaptureWindow()

HWND FASTCALL IntGetCaptureWindow ( VOID  )

Definition at line 34 of file focus.c.

35{
37 if (!ForegroundQueue)
38 return NULL;
39 return (ForegroundQueue->spwndCapture ? UserHMGetHandle(ForegroundQueue->spwndCapture) : NULL);
40}
PUSER_MESSAGE_QUEUE FASTCALL IntGetFocusMessageQueue(VOID)
Definition: desktop.c:1324

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

◆ IntGetThreadFocusWindow()

HWND FASTCALL IntGetThreadFocusWindow ( VOID  )

Definition at line 43 of file focus.c.

44{
46 PUSER_MESSAGE_QUEUE ThreadQueue = pti->MessageQueue;
47 if (!ThreadQueue)
48 return NULL;
49 return (ThreadQueue->spwndFocus ? UserHMGetHandle(ThreadQueue->spwndFocus) : NULL);
50}

Referenced by IntEnableWindow(), and NtUserGetThreadState().

◆ IntLockSetForegroundWindow()

BOOL FASTCALL IntLockSetForegroundWindow ( UINT  uLockCode)

Definition at line 1567 of file focus.c.

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

Referenced by NtUserCallOneParam().

◆ IntReleaseCapture()

BOOL FASTCALL IntReleaseCapture ( VOID  )

Definition at line 1525 of file focus.c.

1526{
1527 PTHREADINFO pti;
1528 PUSER_MESSAGE_QUEUE ThreadQueue;
1529
1531 ThreadQueue = pti->MessageQueue;
1532
1533 // Can not release inside WM_CAPTURECHANGED!!
1534 if (ThreadQueue->QF_flags & QF_CAPTURELOCKED) return FALSE;
1535
1537
1538 return TRUE;
1539}
HWND FASTCALL co_UserSetCapture(HWND hWnd)
Definition: focus.c:1453

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

99{
101 return;
102
103 if ( Window->spwndParent == UserGetDesktopWindow() &&
104 (!(Window->ExStyle & WS_EX_TOOLWINDOW) ||
105 (Window->ExStyle & WS_EX_APPWINDOW)))
106 {
107 // FIXME lParam; The value is TRUE if the window is in full-screen mode, or FALSE otherwise.
108 co_IntShellHookNotify(HSHELL_WINDOWACTIVATED, (WPARAM) UserHMGetHandle(Window), FALSE);
109 }
110 else
111 {
112 co_IntShellHookNotify(HSHELL_WINDOWACTIVATED, 0, FALSE);
113 }
114}
BOOL FASTCALL IntCheckFullscreen(PWND Window)
Definition: focus.c:78
#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 1426 of file focus.c.

1427{
1429 PUSER_MESSAGE_QUEUE ThreadQueue = pti->MessageQueue;
1430 if (!ThreadQueue)
1431 return NULL;
1432 return (ThreadQueue->spwndActive ? UserHMGetHandle(ThreadQueue->spwndActive) : NULL);
1433}

◆ UserSetActiveWindow()

BOOL FASTCALL UserSetActiveWindow ( PWND  Wnd)

Variable Documentation

◆ gpqForeground

◆ gpqForegroundPrev

◆ ptiLastInput

PTHREADINFO ptiLastInput
extern