Changeset 687 for trunk/dll/misc.c
- Timestamp:
- Jun 10, 2007, 10:41:52 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/misc.c
r555 r687 47 47 48 48 #pragma alloc_text(MAINWND5,SetSysMenu) 49 #pragma alloc_text(MISC1,BoxWindow,PaintRecessedWindow,PostMsg,PaintSTextWindow )49 #pragma alloc_text(MISC1,BoxWindow,PaintRecessedWindow,PostMsg,PaintSTextWindow,IsFm2Window) 50 50 #pragma alloc_text(MISC1,FixSwitchList,FindDirCnr,CurrentRecord,SetShiftState,AddToListboxBottom) 51 51 #pragma alloc_text(CNR_MISC1,AdjustCnrColVis,AdjustCnrColsForFSType) … … 74 74 #define ORD_DOS32QUERYEXTLIBPATH 874 75 75 #endif 76 77 BOOL IsFm2Window(HWND hwnd, BOOL chkTid) 78 { 79 PIB *ppib; 80 TIB *ptib; 81 APIRET rc; 82 83 rc = DosGetInfoBlocks(&ptib, &ppib); 84 if (rc) 85 Dos_Error(MB_CANCEL, rc, HWND_DESKTOP, pszSrcFile, __LINE__, 86 "DosGetInfoBlocks"); 87 else { 88 PID pid; 89 TID tid; 90 91 if (WinQueryWindowProcess(hwnd, &pid, &tid)) 92 if (chkTid) { 93 // If window owned by FM2 process on same thread? 94 if (pid == ppib->pib_ulpid && tid == ptib->tib_ptib2->tib2_ultid) 95 return TRUE; 96 } 97 //Window is owned by FM2 98 else if (pid == ppib->pib_ulpid) 99 return TRUE; 100 } 101 return FALSE; 102 } 76 103 77 104 VOID SetShiftState(VOID) … … 1364 1391 1365 1392 if (!rc) { 1366 PIB *ppib;1393 /* PIB *ppib; 1367 1394 TIB *ptib; 1368 1395 … … 1374 1401 if (WinQueryWindowProcess(h, &pid, &tid)) { 1375 1402 // If window owned by some other process or some other thread? 1376 if (pid != ppib->pib_ulpid || tid != ptib->tib_ptib2->tib2_ultid) { 1403 if (pid != ppib->pib_ulpid || tid != ptib->tib_ptib2->tib2_ultid)*/ 1404 if(!IsFm2Window(h, 1)){ 1405 QMSG qmsg; 1377 1406 for (;;) { 1378 1407 DosSleep(1L); … … 1386 1415 } // for 1387 1416 } 1388 } 1389 } 1390 } 1417 } 1391 1418 return rc; 1392 1419 }
Note:
See TracChangeset
for help on using the changeset viewer.