Rev 33 | Rev 45 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 33 | Rev 41 | ||
---|---|---|---|
Line -... | Line 1... | ||
- | 1 | get_titlebar_height: ; edi = window draw_data pointer |
|
- | 2 | mov al,[edi+WDATA.fl_wstyle] |
|
- | 3 | and al,0x0F |
|
- | 4 | cmp al,0x03 |
|
- | 5 | jne @f |
|
- | 6 | mov eax,[_skinh] |
|
- | 7 | ret |
|
- | 8 | @@: mov eax,21 |
|
- | 9 | ret |
|
- | 10 | ||
- | 11 | get_rolledup_height: ; edi = window draw_data pointer |
|
- | 12 | mov al,[edi+WDATA.fl_wstyle] |
|
- | 13 | and al,0x0F |
|
- | 14 | cmp al,0x03 |
|
- | 15 | jne @f |
|
- | 16 | mov eax,[_skinh] |
|
- | 17 | add eax,3 |
|
- | 18 | ret |
|
- | 19 | @@: or al,al |
|
- | 20 | jnz @f |
|
- | 21 | mov eax,21 |
|
- | 22 | ret |
|
- | 23 | @@: mov eax,21+2 |
|
- | 24 | ret |
|
- | 25 | ||
- | 26 | ||
1 | setwindowdefaults: |
27 | setwindowdefaults: |
2 | pushad |
28 | pushad |
Line 3... | Line 29... | ||
3 | 29 | ||
4 | xor eax,eax |
30 | xor eax,eax |
Line 40... | Line 66... | ||
40 | align 4 |
66 | align 4 |
41 | .new_wnd: |
67 | .new_wnd: |
42 | movzx edi, word [0xC400 + esi * 2] |
68 | movzx edi, word [0xC400 + esi * 2] |
43 | shl edi, 5 |
69 | shl edi, 5 |
44 | add edi, window_data |
70 | add edi, window_data |
45 | mov eax, [edi+0] |
71 | test [edi+WDATA.fl_wstate],WSTATE_MINIMIZED |
46 | mov ebx, [edi+4] |
72 | jnz .not_wnd |
47 | mov ecx, [edi+8] |
73 | mov eax,[edi+WDATA.left] |
48 | test ecx, ecx |
74 | mov ebx,[edi+WDATA.top] |
49 | jz .not_wnd |
75 | mov ecx,[edi+WDATA.width] |
50 | add ecx, eax |
76 | add ecx,eax |
51 | mov edx, [edi+12] |
77 | mov edx,[edi+WDATA.height] |
52 | add edx, ebx |
78 | add edx,ebx |
53 | push esi |
79 | push esi |
54 | movzx esi, word [0xC400 + esi * 2] |
80 | movzx esi, word [0xC400 + esi * 2] |
55 | call setscreen |
81 | call setscreen |
56 | pop esi |
82 | pop esi |
Line 232... | Line 258... | ||
232 | ; ebx = pointer to table |
258 | ; ebx = pointer to table |
233 | ; ecx = number of bytes wanted |
259 | ; ecx = number of bytes wanted |
234 | ; eax = 4 ; get skin height |
260 | ; eax = 4 ; get skin height |
235 | ; input : nothing |
261 | ; input : nothing |
236 | ; output : eax = skin height in pixel |
262 | ; output : eax = skin height in pixel |
- | 263 | ; eax = 5 ; get screen workarea |
|
- | 264 | ; input : nothing |
|
- | 265 | ; output : eax = [left]*65536+[right] |
|
- | 266 | ; ebx = [top]*65536+[bottom] |
|
- | 267 | ; eax = 6 ; set screen workarea |
|
- | 268 | ; input : ecx = [left]*65536+[right] |
|
- | 269 | ; edx = [top]*65536+[bottom] |
|
- | 270 | ; output : nothing |
|
Line 237... | Line 271... | ||
237 | 271 | ||
Line 238... | Line 272... | ||
238 | 272 | ||
Line 243... | Line 277... | ||
243 | test ebx, ebx |
277 | test ebx, ebx |
244 | jnz dspl0 |
278 | jnz dspl0 |
245 | cmp [windowtypechanged],dword 1 |
279 | cmp [windowtypechanged],dword 1 |
246 | jne dspl00 |
280 | jne dspl00 |
247 | mov [windowtypechanged],dword 0 |
281 | mov [windowtypechanged],dword 0 |
- | 282 | redraw_screen_direct: |
|
248 | mov [dlx],dword 0 |
283 | mov [dlx],dword 0 |
249 | mov [dly],dword 0 |
284 | mov [dly],dword 0 |
250 | mov eax,[0xfe00] |
285 | mov eax,[0xfe00] |
251 | mov [dlxe],eax |
286 | mov [dlxe],eax |
252 | mov eax,[0xfe04] |
287 | mov eax,[0xfe04] |
Line 305... | Line 340... | ||
305 | mov eax,[_skinh] |
340 | mov eax,[_skinh] |
306 | mov [esp+36],eax |
341 | mov [esp+36],eax |
307 | ret |
342 | ret |
308 | no_skin_height: |
343 | no_skin_height: |
Line -... | Line 344... | ||
- | 344 | ||
- | 345 | cmp eax,5 ; get screen workarea |
|
- | 346 | jne no_get_workarea |
|
- | 347 | popad |
|
- | 348 | mov eax,[screen_workarea.left-2] |
|
- | 349 | mov ax,word[screen_workarea.right] |
|
- | 350 | mov [esp+36],eax |
|
- | 351 | mov eax,[screen_workarea.top-2] |
|
- | 352 | mov ax,word[screen_workarea.bottom] |
|
- | 353 | mov [esp+24],eax |
|
- | 354 | ret |
|
- | 355 | no_get_workarea: |
|
- | 356 | ||
- | 357 | cmp eax,6 ; set screen workarea |
|
- | 358 | jne no_set_workarea |
|
- | 359 | movzx eax,word[esp+16+2] |
|
- | 360 | movzx ebx,word[esp+16] |
|
- | 361 | cmp eax,[0xFE00] |
|
- | 362 | jae .exit |
|
- | 363 | cmp ebx,[0xFE00] |
|
- | 364 | ja .exit |
|
- | 365 | cmp eax,ebx |
|
- | 366 | jae .exit |
|
- | 367 | mov [screen_workarea.left],eax |
|
- | 368 | mov [screen_workarea.right],ebx |
|
- | 369 | movzx eax,word[esp+24+2] |
|
- | 370 | movzx ebx,word[esp+24] |
|
- | 371 | cmp eax,[0xFE04] |
|
- | 372 | jae .exit |
|
- | 373 | cmp ebx,[0xFE04] |
|
- | 374 | ja .exit |
|
- | 375 | cmp eax,ebx |
|
- | 376 | jae .exit |
|
- | 377 | mov [screen_workarea.top],eax |
|
- | 378 | mov [screen_workarea.bottom],ebx |
|
- | 379 | ||
- | 380 | mov ecx,[0x3004] |
|
- | 381 | mov esi,0x20*2 |
|
- | 382 | dec ecx |
|
- | 383 | @@: test [esi+WDATA.fl_wstate],WSTATE_MAXIMIZED |
|
- | 384 | jz .lp1 |
|
- | 385 | mov eax,[screen_workarea.left] |
|
- | 386 | mov [esi+WDATA.left],eax |
|
- | 387 | sub eax,[screen_workarea.right] |
|
- | 388 | neg eax |
|
- | 389 | mov [esi+WDATA.width],eax |
|
- | 390 | mov eax,[screen_workarea.top] |
|
- | 391 | mov [esi+WDATA.top],eax |
|
- | 392 | test [esi+WDATA.fl_wstate],WSTATE_ROLLEDUP |
|
- | 393 | jnz .lp1 |
|
- | 394 | sub eax,[screen_workarea.bottom] |
|
- | 395 | neg eax |
|
- | 396 | mov [esi+WDATA.height],eax |
|
- | 397 | .lp1: add esi,0x20 |
|
- | 398 | loop @b |
|
- | 399 | call calculatescreen |
|
- | 400 | jmp redraw_screen_direct |
|
- | 401 | .exit: |
|
- | 402 | popad |
|
- | 403 | ret |
|
- | 404 | no_set_workarea: |
|
309 | 405 | ||
310 | popad |
406 | popad |
Line 311... | Line 407... | ||
311 | ret |
407 | ret |
312 | 408 | ||
Line 325... | Line 421... | ||
325 | je window_move_return |
421 | je window_move_return |
Line 326... | Line 422... | ||
326 | 422 | ||
327 | shl edi,5 |
423 | shl edi,5 |
Line -... | Line 424... | ||
- | 424 | add edi,window_data |
|
- | 425 | ||
- | 426 | test [edi+WDATA.fl_wstate],WSTATE_MAXIMIZED |
|
328 | add edi,window_data |
427 | jnz window_move_return |
329 | 428 | ||
330 | push dword [edi+0] ; save old coordinates |
429 | push dword [edi+0] ; save old coordinates |
331 | push dword [edi+4] |
430 | push dword [edi+4] |
Line 343... | Line 442... | ||
343 | no_x_reposition: |
442 | no_x_reposition: |
344 | cmp ebx,-1 |
443 | cmp ebx,-1 |
345 | je no_y_reposition |
444 | je no_y_reposition |
346 | mov [edi+4],ebx |
445 | mov [edi+4],ebx |
347 | no_y_reposition: |
446 | no_y_reposition: |
- | 447 | ||
- | 448 | test [edi+WDATA.fl_wstate],WSTATE_ROLLEDUP |
|
- | 449 | jnz no_y_resizing |
|
- | 450 | ||
348 | cmp ecx,-1 |
451 | cmp ecx,-1 |
349 | je no_x_resizing |
452 | je no_x_resizing |
350 | mov [edi+8],ecx |
453 | mov [edi+8],ecx |
351 | no_x_resizing: |
454 | no_x_resizing: |
352 | cmp edx,-1 |
455 | cmp edx,-1 |
Line 982... | Line 1085... | ||
982 | je .mouse_buttons_pressed |
1085 | je .mouse_buttons_pressed |
983 | mov esi,[0x3004] |
1086 | mov esi,[0x3004] |
984 | movzx edi, word [0xC400 + esi * 2] |
1087 | movzx edi, word [0xC400 + esi * 2] |
985 | shl edi, 5 |
1088 | shl edi, 5 |
986 | add edi, window_data |
1089 | add edi, window_data |
987 | cmp [edi+12],dword 0 |
1090 | test [edi+WDATA.fl_wstate],WSTATE_MINIMIZED |
988 | je .mouse_buttons_pressed |
1091 | jnz .mouse_buttons_pressed |
989 | ; jne .no_activate_request_2 |
1092 | ; jne .no_activate_request_2 |
990 | ; .no_activate_request_1: |
1093 | ; .no_activate_request_1: |
991 | ; cmp [window_minimize],1 |
1094 | ; cmp [window_minimize],1 |
992 | ; jge .mouse_buttons_pressed |
1095 | ; jge .mouse_buttons_pressed |
993 | ; jmp .mouse_buttons_pressed |
1096 | ; jmp .mouse_buttons_pressed |
Line 1015... | Line 1118... | ||
1015 | 1118 | ||
1016 | mov eax,ecx |
1119 | mov eax,ecx |
1017 | mov ebx,edx |
1120 | mov ebx,edx |
1018 | cmp [window_minimize],1 |
1121 | cmp [window_minimize],1 |
- | 1122 | jge .window_minimize_no_check_mouse |
|
- | 1123 | test [edi+WDATA.fl_wstate],WSTATE_MINIMIZED |
|
Line 1019... | Line 1124... | ||
1019 | jge .window_minimize_no_check_mouse |
1124 | jnz cwloop |
1020 | 1125 | ||
Line 1021... | Line 1126... | ||
1021 | movzx eax, word [0xfb0a] |
1126 | movzx eax, word [0xfb0a] |
Line 1061... | Line 1166... | ||
1061 | jne .window_move_enabled_for_user |
1166 | jne .window_move_enabled_for_user |
1062 | popad |
1167 | popad |
1063 | ret |
1168 | ret |
1064 | .window_move_enabled_for_user: |
1169 | .window_move_enabled_for_user: |
Line -... | Line 1170... | ||
- | 1170 | ||
- | 1171 | test [edi+WDATA.fl_wstate],WSTATE_ROLLEDUP |
|
- | 1172 | jnz .no_resize_2 |
|
1065 | 1173 | ||
1066 | mov [do_resize_from_corner],byte 0 ; resize for skinned window |
1174 | mov [do_resize_from_corner],byte 0 ; resize for skinned window |
1067 | mov edx, [edi+0x10] |
1175 | mov edx, [edi+0x10] |
1068 | and edx, 0x0f000000 |
1176 | and edx, 0x0f000000 |
1069 | cmp edx, 0x02000000 |
1177 | cmp edx, 0x02000000 |
Line 1076... | Line 1184... | ||
1076 | jb .no_resize_2 |
1184 | jb .no_resize_2 |
1077 | mov [do_resize_from_corner],byte 1 |
1185 | mov [do_resize_from_corner],byte 1 |
1078 | jmp .continue |
1186 | jmp .continue |
1079 | .no_resize_2: |
1187 | .no_resize_2: |
Line 1080... | Line -... | ||
1080 | - | ||
1081 | ;// mike.dld [ |
- | |
1082 | mov dl,[edi+0x10+3] |
1188 | |
1083 | and dl,0x0F |
1189 | push eax |
1084 | cmp dl,0x03 |
- | |
1085 | jne @f |
- | |
1086 | mov edx, [edi+4] ; check if touch on bar |
1190 | call get_titlebar_height |
1087 | add edx, [_skinh] |
1191 | add eax,[edi+4] |
1088 | cmp ebx, edx |
- | |
1089 | jae .exit |
- | |
1090 | jmp .continue |
- | |
1091 | @@: |
- | |
1092 | ;// mike.dld ] |
- | |
1093 | - | ||
1094 | mov edx, [edi+4] ; check if touch on bar |
- | |
1095 | add edx, 21 |
1192 | cmp ebx,eax |
1096 | cmp ebx, edx |
1193 | pop eax |
Line 1097... | Line 1194... | ||
1097 | jae .exit |
1194 | jae .exit |
Line 1098... | Line 1195... | ||
1098 | 1195 | ||
Line 1109... | Line 1206... | ||
1109 | mov [latest_window_touch], ecx |
1206 | mov [latest_window_touch], ecx |
1110 | mov [latest_window_touch_delta], edx |
1207 | mov [latest_window_touch_delta], edx |
Line 1111... | Line 1208... | ||
1111 | 1208 | ||
1112 | mov cl, [0xfb40] ; save for shade check |
1209 | mov cl, [0xfb40] ; save for shade check |
1113 | mov [do_resize], cl |
- | |
1114 | cmp [window_minimize],0 |
- | |
1115 | je no_emulation_righ_button |
- | |
1116 | mov [do_resize], byte 2 |
1210 | mov [do_resize], cl |
1117 | no_emulation_righ_button: |
1211 | no_emulation_righ_button: |
1118 | mov ecx, [edi+0] |
1212 | mov ecx, [edi+0] |
Line 1119... | Line 1213... | ||
1119 | mov edx, [edi+4] |
1213 | mov edx, [edi+4] |
Line 1155... | Line 1249... | ||
1155 | mov ax,[edi+12] |
1249 | mov ax,[edi+12] |
1156 | mov word [oldc+12],ax |
1250 | mov word [oldc+12],ax |
1157 | mov word [npye],ax |
1251 | mov word [npye],ax |
1158 | pop eax |
1252 | pop eax |
Line -... | Line 1253... | ||
- | 1253 | ||
- | 1254 | test [edi+WDATA.fl_wstate],WSTATE_MAXIMIZED |
|
1159 | 1255 | jnz @f |
|
- | 1256 | call drawwindowframes |
|
Line 1160... | Line 1257... | ||
1160 | call drawwindowframes |
1257 | @@: |
1161 | 1258 | ||
Line 1162... | Line 1259... | ||
1162 | mov [reposition],0 |
1259 | mov [reposition],0 |
Line 1190... | Line 1287... | ||
1190 | sub dx,bx |
1287 | sub dx,bx |
Line 1191... | Line 1288... | ||
1191 | 1288 | ||
1192 | push ax |
1289 | push ax |
Line -... | Line 1290... | ||
- | 1290 | push bx |
|
- | 1291 | ||
1193 | push bx |
1292 | test [edi+WDATA.fl_wstate],WSTATE_MAXIMIZED |
- | 1293 | jnz @f |
|
Line 1194... | Line 1294... | ||
1194 | 1294 | call drawwindowframes |
|
1195 | call drawwindowframes |
1295 | @@: |
Line 1196... | Line 1296... | ||
1196 | 1296 | ||
Line 1243... | Line 1343... | ||
1243 | mov eax,[edx+0x90+8] |
1343 | mov eax,[edx+0x90+8] |
1244 | nnepx2: |
1344 | nnepx2: |
1245 | mov [npxe],eax |
1345 | mov [npxe],eax |
1246 | nnepx: |
1346 | nnepx: |
Line -... | Line 1347... | ||
- | 1347 | ||
- | 1348 | call get_titlebar_height |
|
1247 | 1349 | mov ebx,eax |
|
1248 | movzx eax,word [0xfb0c] |
1350 | movzx eax,word [0xfb0c] |
1249 | cmp eax,[edi+4] |
1351 | cmp eax,[edi+4] |
1250 | jb nnepy |
1352 | jb nnepy |
1251 | sub eax,[edi+4] |
1353 | sub eax,[edi+4] |
1252 | cmp eax,23 ; [edx+0x90+12] |
1354 | cmp eax,ebx ; [edx+0x90+12] |
1253 | jge nnepy2 |
1355 | jge nnepy2 |
1254 | mov eax,23 ; [edx+0x90+12] |
1356 | mov eax,ebx ; [edx+0x90+12] |
1255 | nnepy2: |
1357 | nnepy2: |
1256 | mov [npye],eax |
1358 | mov [npye],eax |
Line 1257... | Line 1359... | ||
1257 | nnepy: |
1359 | nnepy: |
Line 1261... | Line 1363... | ||
1261 | popad |
1363 | popad |
1262 | norepos_size: |
1364 | norepos_size: |
Line 1263... | Line 1365... | ||
1263 | 1365 | ||
1264 | pop bx |
1366 | pop bx |
- | 1367 | pop ax |
|
- | 1368 | test [edi+WDATA.fl_wstate],WSTATE_MAXIMIZED |
|
1265 | pop ax |
1369 | jnz @f |
- | 1370 | call drawwindowframes |
|
Line 1266... | Line 1371... | ||
1266 | call drawwindowframes |
1371 | @@: |
1267 | 1372 | ||
Line 1268... | Line 1373... | ||
1268 | mov esi,[0xfb0a] |
1373 | mov esi,[0xfb0a] |
1269 | mov [0xf300],esi |
1374 | mov [0xf300],esi |
1270 | 1375 | ||
1271 | cwb: |
1376 | cwb: |
1272 | cmp [0xfb40],byte 0 |
- | |
1273 | jne newchm |
1377 | cmp [0xfb40],byte 0 |
- | 1378 | jne newchm |
|
- | 1379 | ; new position done |
|
- | 1380 | mov [0xfff5],byte 1 |
|
- | 1381 | mov cl,0 |
|
- | 1382 | test [edi+WDATA.fl_wstate],WSTATE_MAXIMIZED |
|
Line 1274... | Line 1383... | ||
1274 | ; new position done |
1383 | jnz @f |
1275 | call drawwindowframes |
1384 | mov cl,[reposition] |
1276 | mov [0xfff5],byte 1 |
1385 | call drawwindowframes |
1277 | 1386 | ||
1278 | mov eax,[npx] |
1387 | mov eax,[npx] |
1279 | mov [edi+0],eax |
1388 | mov [edi+0],eax |
1280 | mov eax,[npy] |
1389 | mov eax,[npy] |
1281 | mov [edi+4],eax |
1390 | mov [edi+4],eax |
Line -... | Line 1391... | ||
- | 1391 | mov eax,[npxe] |
|
- | 1392 | mov [edi+8],eax |
|
1282 | mov eax,[npxe] |
1393 | mov eax,[npye] |
1283 | mov [edi+8],eax |
1394 | mov [edi+12],eax |
1284 | mov eax,[npye] |
1395 | |
1285 | mov [edi+12],eax |
1396 | @@: mov [reposition],cl |
1286 | 1397 | ||
Line 1308... | Line 1419... | ||
1308 | sub edx,window_data |
1419 | sub edx,window_data |
1309 | shr edx,5 |
1420 | shr edx,5 |
1310 | shl edx,8 |
1421 | shl edx,8 |
1311 | add edx,0x80000 ; process base at 0x80000+ |
1422 | add edx,0x80000 ; process base at 0x80000+ |
Line 1312... | Line 1423... | ||
1312 | 1423 | ||
1313 | cmp [do_resize],2 ; window shade ? |
1424 | cmp [window_minimize],0 |
1314 | jb no_window_shade |
1425 | je no_wnd_minimize_restore |
1315 | mov [reposition],1 |
1426 | mov [reposition],1 |
1316 | 1427 | wnd_minimize: |
|
1317 | cmp [window_minimize],1 |
1428 | cmp [window_minimize],1 |
1318 | jge for_window_minimize |
1429 | jne wnd_restore |
1319 | cmp [edi+12],dword 23 |
- | |
1320 | jle window_shade_up |
1430 | or [edi+WDATA.fl_wstate],WSTATE_MINIMIZED |
1321 | jmp for_window_shade |
- | |
1322 | for_window_minimize: |
- | |
1323 | cmp [edi+12],dword 0 |
- | |
1324 | je window_shade_up |
1431 | jmp no_wnd_minimize_restore |
1325 | for_window_shade: |
- | |
1326 | cmp [window_minimize],0 |
- | |
1327 | je no_window_minimize |
1432 | wnd_restore: |
1328 | cmp [window_minimize],2 |
1433 | cmp [window_minimize],2 |
1329 | je window_minimize_no_shade_full ;window_shade_up |
- | |
1330 | mov [edi+8],dword 0 ;66 |
1434 | jne no_wnd_minimize_restore |
1331 | mov [edi+12],dword 0 ;279 ; on |
- | |
1332 | jmp no_window_shade |
1435 | and [edi+WDATA.fl_wstate],not WSTATE_MINIMIZED |
1333 | no_window_minimize: |
- | |
1334 | mov [edi+12],dword 23 ; on |
- | |
1335 | jmp no_window_shade |
- | |
1336 | window_shade_up: |
- | |
1337 | cmp [window_minimize],1 |
- | |
1338 | jge window_minimize_no_shade_full |
- | |
1339 | mov eax,[edi+0] |
- | |
1340 | add eax,[edi+4] |
- | |
1341 | test eax, eax |
- | |
1342 | je shade_full |
- | |
1343 | push edi |
- | |
1344 | lea esi, [edx + 0x90] |
- | |
1345 | mov ecx,4 |
- | |
1346 | cld |
- | |
1347 | rep movsd |
- | |
Line 1348... | Line -... | ||
1348 | pop edi |
- | |
1349 | - | ||
1350 | window_minimize_no_shade_full: |
- | |
1351 | ; mov eax,[edx+0x90] ; off |
- | |
1352 | ; mov [edi+0],eax |
- | |
1353 | ; mov eax,[edx+0x94] ; off |
- | |
1354 | ; mov [edi+4],eax |
- | |
1355 | ; mov eax,[edx+0x98] ; off |
- | |
1356 | ; mov [edi+8],eax |
- | |
Line -... | Line 1436... | ||
- | 1436 | no_wnd_minimize_restore: |
|
1357 | ; mov eax,[edx+0x9C] ; off |
1437 | |
1358 | ; mov [edi+12],eax |
1438 | |
- | 1439 | cmp [do_resize],2 ; window shade ? |
|
- | 1440 | jne no_window_shade |
|
1359 | 1441 | mov [reposition],1 |
|
1360 | push edi |
1442 | |
- | 1443 | test [edi+WDATA.fl_wstate],WSTATE_ROLLEDUP |
|
- | 1444 | jnz wnd_rolldown |
|
1361 | lea esi, [edx + 0x90] |
1445 | wnd_rollup: |
- | 1446 | or [edi+WDATA.fl_wstate],WSTATE_ROLLEDUP |
|
- | 1447 | call get_rolledup_height |
|
- | 1448 | jmp @f |
|
- | 1449 | wnd_rolldown: |
|
1362 | mov ecx,4 |
1450 | and [edi+WDATA.fl_wstate],not WSTATE_ROLLEDUP |
- | 1451 | mov eax,[edx+0x90+BOX.height] |
|
1363 | cld |
1452 | test [edi+WDATA.fl_wstate],WSTATE_MAXIMIZED |
- | 1453 | jz @f |
|
Line 1364... | Line -... | ||
1364 | rep movsd |
- | |
1365 | pop edi |
- | |
1366 | jmp no_window_shade |
- | |
1367 | - | ||
1368 | shade_full: |
- | |
1369 | ; mov eax,[0xfe00] |
- | |
1370 | ; mov [edi+8],eax |
1454 | mov eax,[screen_workarea.bottom] |
Line 1371... | Line 1455... | ||
1371 | mov eax,[0xfe04] |
1455 | sub eax,[screen_workarea.top] |
1372 | sub eax,19 |
1456 | @@: mov [edi+WDATA.height],eax |
1373 | mov [edi+12],eax |
1457 | |
1374 | no_window_shade: |
1458 | no_window_shade: |
1375 | 1459 | ||
- | 1460 | cmp [do_resize],1 ; fullscreen/restore ? |
|
1376 | cmp [do_resize],1 ; fullscreen/restore ? |
1461 | jne no_fullscreen_restore |
1377 | jne no_fullscreen_restore |
1462 | cmp [latest_window_touch_delta],dword 50 |
1378 | cmp [latest_window_touch_delta],dword 50 |
1463 | jg no_fullscreen_restore |
1379 | jg no_fullscreen_restore |
1464 | mov [reposition],1 |
1380 | mov [reposition],1 |
1465 | test [edi+WDATA.fl_wstate],WSTATE_MAXIMIZED |
- | 1466 | jnz restore_from_fullscreen |
|
1381 | mov eax,[edi+12] |
1467 | or [edi+WDATA.fl_wstate],WSTATE_MAXIMIZED |
1382 | add eax,19 |
1468 | mov eax,[screen_workarea.left] |
1383 | cmp eax,[0xfe04] |
1469 | mov [edi+WDATA.left],eax |
- | 1470 | sub eax,[screen_workarea.right] |
|
1384 | je restore_from_fullscreen |
1471 | neg eax |
- | 1472 | mov [edi+WDATA.width],eax |
|
1385 | mov [edi+0],dword 0 ; set fullscreen |
1473 | mov eax,[screen_workarea.top] |
1386 | mov [edi+4],dword 0 |
1474 | mov [edi+WDATA.top],eax |
- | 1475 | test [edi+WDATA.fl_wstate],WSTATE_ROLLEDUP |
|
1387 | mov eax,[0xfe00] |
1476 | jnz @f |
1388 | mov [edi+8],eax |
1477 | sub eax,[screen_workarea.bottom] |
- | 1478 | neg eax |
|
- | 1479 | mov [edi+WDATA.height],eax |
|
1389 | mov eax,[0xfe04] |
1480 | @@: |
1390 | sub eax,19 |
- | |
1391 | mov [edi+12],eax |
- | |
1392 | jmp no_fullscreen_restore |
1481 | jmp no_fullscreen_restore |
1393 | restore_from_fullscreen: |
1482 | restore_from_fullscreen: |
1394 | push edi ; restore |
1483 | and [edi+WDATA.fl_wstate],not WSTATE_MAXIMIZED |
1395 | ; mov esi,edx |
1484 | push [edi+WDATA.height] |
1396 | ; add esi,0x90 |
1485 | push edi ; restore |
- | 1486 | lea esi, [edx + 0x90] |
|
- | 1487 | mov ecx,4 |
|
- | 1488 | cld |
|
- | 1489 | rep movsd |
|
- | 1490 | pop edi |
|
Line 1397... | Line 1491... | ||
1397 | lea esi, [edx + 0x90] |
1491 | pop eax |
Line 1398... | Line 1492... | ||
1398 | mov ecx,4 |
1492 | test [edi+WDATA.fl_wstate],WSTATE_ROLLEDUP |
1399 | cld |
1493 | jz @f |
Line 1450... | Line 1544... | ||
1450 | call calculatescreen |
1544 | call calculatescreen |
1451 | move_calculated: |
1545 | move_calculated: |
Line 1452... | Line 1546... | ||
1452 | 1546 | ||
Line 1453... | Line 1547... | ||
1453 | popad |
1547 | popad |
1454 | 1548 | ||
Line 1455... | Line 1549... | ||
1455 | mov [edi+31],byte 1 ; mark first as redraw |
1549 | mov [edi+WDATA.fl_redraw],1 |
1456 | mov [0xfff5],byte 1 ; no mouse |
1550 | mov [0xfff5],byte 1 ; no mouse |
1457 | 1551 | ||
Line 1470... | Line 1564... | ||
1470 | 1564 | ||
1471 | mov ecx,100 ; wait to avoid mouse residuals |
1565 | mov ecx,100 ; wait to avoid mouse residuals |
1472 | waitre2: |
1566 | waitre2: |
1473 | mov [0xfff5],byte 1 |
1567 | mov [0xfff5],byte 1 |
1474 | call checkidle |
1568 | call checkidle |
1475 | cmp [edi+31],byte 0 |
1569 | cmp [edi+WDATA.fl_redraw],0 |
1476 | jz retwm |
1570 | jz retwm |
Line 1477... | Line 1571... | ||
1477 | loop waitre2 |
1571 | loop waitre2 |