File tree Expand file tree Collapse file tree 1 file changed +19
-3
lines changed Expand file tree Collapse file tree 1 file changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -1216,17 +1216,33 @@ void EnableHotkeys( THotkeys enable )
1216
1216
}
1217
1217
}
1218
1218
1219
+ bool IsTouchTaskbar (void )
1220
+ {
1221
+ if (!IsWin11 ())
1222
+ return false ;
1223
+
1224
+ CRegKey regKey;
1225
+ if (regKey.Open (HKEY_CURRENT_USER, L" Software\\ Microsoft\\ Windows\\ CurrentVersion\\ Explorer" ) != ERROR_SUCCESS)
1226
+ return false ;
1227
+
1228
+ DWORD val;
1229
+ return regKey.QueryDWORDValue (L" TabletPostureTaskbar" , val) == ERROR_SUCCESS && val;
1230
+ }
1231
+
1219
1232
static void UpdateStartButtonPosition (const TaskbarInfo* taskBar, const WINDOWPOS* pPos)
1220
1233
{
1221
1234
if (IsStartButtonSmallIcons (taskBar->taskbarId ) != IsTaskbarSmallIcons ())
1222
1235
RecreateStartButton (taskBar->taskbarId );
1223
1236
1224
1237
RECT rcTask;
1225
1238
GetWindowRect (taskBar->taskBar , &rcTask);
1226
- if (RECT rc; GetWindowRgnBox (taskBar-> taskBar , &rc) != ERROR )
1239
+ if (IsTouchTaskbar () )
1227
1240
{
1228
- MapWindowPoints (taskBar->taskBar , NULL , (POINT*)&rc, 2 );
1229
- rcTask = rc;
1241
+ if (RECT rc; GetWindowRgnBox (taskBar->taskBar , &rc) != ERROR)
1242
+ {
1243
+ MapWindowPoints (taskBar->taskBar , NULL , (POINT*)&rc, 2 );
1244
+ rcTask = rc;
1245
+ }
1230
1246
}
1231
1247
MONITORINFO info;
1232
1248
UINT uEdge = GetTaskbarPosition (taskBar->taskBar , &info, NULL , NULL );
You can’t perform that action at this time.
0 commit comments