ReactOS 0.4.16-dev-1946-g52006dd
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 1252 of file focus.c.

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

1562{
1564
1566}

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

◆ co_UserSetCapture()

HWND FASTCALL co_UserSetCapture ( HWND  hWnd)

These are HACKS!

Definition at line 1458 of file focus.c.

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

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

1604{
1605 PPROCESSINFO ppi, ppiCur;
1607
1608 ppi = NULL;
1609 if (dwProcessId != ASFW_ANY)
1610 {
1612 {
1614 return FALSE;
1615 }
1617 if (!ppi)
1618 {
1620 return FALSE;
1621 }
1622 }
1624 if (!CanForceFG(ppiCur))
1625 {
1628 return FALSE;
1629 }
1630 if (dwProcessId == ASFW_ANY)
1631 { // All processes will be enabled to set the foreground window.
1632 //ERR("ptiLastInput is CLEARED!!\n");
1634 }
1635 else
1636 { // Rule #3, last input event in force.
1637 ERR("ptiLastInput is SET!!\n");
1638 //ptiLastInput = ppi->ptiList; // See CORE-6384 & CORE-7030.
1640 }
1641 return TRUE;
1642}
#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:751
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:22
#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:100
VOID co_IntShellHookNotify(WPARAM Message, WPARAM wParam, LPARAM lParam)
Definition: desktop.c:1706
#define HSHELL_RUDEAPPACTIVATED
Definition: winuser.h:1292

Referenced by co_WinPosSetWindowPos(), and UpdateShellHook().

◆ IntDeactivateWindow()

BOOL FASTCALL IntDeactivateWindow ( PTHREADINFO  pti,
HANDLE  tid 
)

Definition at line 190 of file focus.c.

191{
193 PTHREADINFO ptiPrev;
194 PWND pwndPrev;
195 BOOL InAAPM = FALSE;
197
198 if ( !pti->MessageQueue->spwndActive )
199 {
200 TRACE("IDAW E : Nothing to do, Active is NULL! pti 0x%p tid 0x%p\n",pti,tid);
201 return TRUE;
202 }
203
204 TRACE("IDAW : pti 0x%p tid 0x%p\n",pti,tid);
205
206 if (ptiCurrent != pti)
207 {
209 IntReferenceThreadInfo(ptiCurrent);
210 }
211
212 if (!(pti->TIF_flags & TIF_INACTIVATEAPPMSG) )
213 {
215 InAAPM = TRUE;
216 }
217
218 //
219 // Check for Capture and release it.
220 //
221 if ( pti->MessageQueue->spwndCapture )
222 {
223 MSG msg;
224 PWND pwndCapture = pti->MessageQueue->spwndCapture;
225
226 UserRefObjectCo(pwndCapture, &Ref);
228 UserDerefObjectCo(pwndCapture);
229
230 /* Generate mouse move message */
231 msg.message = WM_MOUSEMOVE;
232 msg.wParam = UserGetMouseButtonsState();
233 msg.lParam = MAKELPARAM(gpsi->ptCursor.x, gpsi->ptCursor.y);
234 msg.pt = gpsi->ptCursor;
236 }
237
238 //
239 // Check for Active and release it.
240 //
241 if ( pti->MessageQueue->spwndActive )
242 {
243 pwndPrev = pti->MessageQueue->spwndActive;
244 ptiPrev = pwndPrev->head.pti;
245
247 {
248 if (InAAPM) pti->TIF_flags &= ~TIF_INACTIVATEAPPMSG;
249 if (ptiCurrent != pti)
250 {
252 IntDereferenceThreadInfo(ptiCurrent);
253 }
254 return FALSE;
255 }
256
257 if ( pti->MessageQueue->spwndActive == pwndPrev )
258 {
259 pti->MessageQueue->spwndActivePrev = pwndPrev;
260 pti->MessageQueue->spwndActive = NULL;
261 }
262
263 if (ptiPrev->TIF_flags & TIF_INCLEANUP) ptiPrev = NULL;
264 }
265 else
266 {
267 ptiPrev = pti;
268 pwndPrev = (PWND)-1; // Avoid zero Active window.
269 }
270
271 if ( ptiPrev )
272 {
273 HANDLE OldTID = PsGetThreadId(ptiPrev->pEThread);
274 PWND cWindow;
275 HWND *List, *phWnd;
276
278 if ( List )
279 {
280 if ( OldTID )
281 {
282 for (phWnd = List; *phWnd; ++phWnd)
283 {
284 cWindow = ValidateHwndNoErr(*phWnd);
285 if ( cWindow && cWindow->head.pti == ptiPrev )
286 { // FALSE if the window is being deactivated,
287 // ThreadId that owns the window being activated.
288 //ERR("IDW : WM_ACTIVATEAPP(0) hwnd %p tid Old %p New %p\n",UserHMGetHandle(cWindow),OldTID,tid);
289 UserRefObjectCo(cWindow, &Ref);
291 UserDerefObjectCo(cWindow);
292 }
293 }
294 }
296 }
297 }
298
299 //
300 // Now check for a change (Bounce), if Active same as previous window, release it too.
301 //
302 if ( pti->MessageQueue->spwndActive == pwndPrev )
303 {
305 {
306 if (InAAPM) pti->TIF_flags &= ~TIF_INACTIVATEAPPMSG;
307 if (ptiCurrent != pti)
308 {
310 IntDereferenceThreadInfo(ptiCurrent);
311 }
312 return FALSE;
313 }
314
315 if ( pti->MessageQueue->spwndActive == pwndPrev )
316 {
317 pti->MessageQueue->spwndActivePrev = pwndPrev;
318 pti->MessageQueue->spwndActive = NULL;
319 }
320 }
321
322 //
323 // Check for Focus and release it.
324 //
325 if ( pti->MessageQueue->spwndFocus )
326 {
327 PWND pwndFocus = pti->MessageQueue->spwndFocus;
328
329 //
330 // Fix win.c:test_SetForegroundWindow:SetActiveWindow(0)!
331 //
332 pti->MessageQueue->spwndFocus = NULL; // Null out Focus.
333
334 UserRefObjectCo(pwndFocus, &Ref);
336 if (IS_IMM_MODE())
337 {
339 }
340 UserDerefObjectCo(pwndFocus);
341 }
342
343 /* Check for keyboard modifiers and release them (CORE-14768) */
345
346 if (InAAPM) pti->TIF_flags &= ~TIF_INACTIVATEAPPMSG;
347 if (ptiCurrent != pti)
348 {
350 IntDereferenceThreadInfo(ptiCurrent);
351 }
352 return TRUE;
353}
#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:149
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:1403
WORD FASTCALL UserGetMouseButtonsState(VOID)
Definition: mouse.c:22
#define USERTAG_WINDOWLIST
Definition: tags.h:298
HWND *FASTCALL IntWinListChildren(PWND Window)
Definition: window.c:276
#define MAKELPARAM(l, h)
Definition: winuser.h:4110
#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 1441 of file focus.c.

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

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

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

Referenced by NtUserCallOneParam().

◆ IntReleaseCapture()

BOOL FASTCALL IntReleaseCapture ( VOID  )

Definition at line 1530 of file focus.c.

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

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

1432{
1434 PUSER_MESSAGE_QUEUE ThreadQueue = pti->MessageQueue;
1435 if (!ThreadQueue)
1436 return NULL;
1437 return (ThreadQueue->spwndActive ? UserHMGetHandle(ThreadQueue->spwndActive) : NULL);
1438}

◆ UserSetActiveWindow()

BOOL FASTCALL UserSetActiveWindow ( PWND  Wnd)

Variable Documentation

◆ gpqForeground

◆ gpqForegroundPrev

◆ ptiLastInput

PTHREADINFO ptiLastInput
extern