Rev 1505 | Rev 1710 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1505 | Rev 1689 | ||
---|---|---|---|
Line 4... | Line 4... | ||
4 | ;; Copyright (C) MenuetOS 2000-2004 Ville Mikael Turjanmaa ;; |
4 | ;; Copyright (C) MenuetOS 2000-2004 Ville Mikael Turjanmaa ;; |
5 | ;; Distributed under terms of the GNU General Public License ;; |
5 | ;; Distributed under terms of the GNU General Public License ;; |
6 | ;; ;; |
6 | ;; ;; |
7 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
7 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
Line 8... | Line 8... | ||
8 | 8 | ||
Line 9... | Line 9... | ||
9 | $Revision: 1474 $ |
9 | $Revision: 1689 $ |
10 | 10 | ||
11 | ;============================================================================== |
11 | ;============================================================================== |
Line 317... | Line 317... | ||
317 | ;------------------------------------------------------------------------------ |
317 | ;------------------------------------------------------------------------------ |
318 | mov edi, [CURRENT_TASK] |
318 | mov edi, [CURRENT_TASK] |
319 | shl edi, 5 |
319 | shl edi, 5 |
320 | add edi, window_data |
320 | add edi, window_data |
Line -... | Line 321... | ||
- | 321 | ||
- | 322 | test [edi + WDATA.fl_wdrawn], 1 |
|
- | 323 | jz .exit |
|
321 | 324 | ||
322 | test [edi + WDATA.fl_wstate], WSTATE_MAXIMIZED |
325 | test [edi + WDATA.fl_wstate], WSTATE_MAXIMIZED |
Line 323... | Line 326... | ||
323 | jnz .exit |
326 | jnz .exit |
324 | 327 | ||
Line 390... | Line 393... | ||
390 | ;------------------------------------------------------------------------------ |
393 | ;------------------------------------------------------------------------------ |
391 | set_window_defaults: ;///////////////////////////////////////////////////////// |
394 | set_window_defaults: ;///////////////////////////////////////////////////////// |
392 | ;------------------------------------------------------------------------------ |
395 | ;------------------------------------------------------------------------------ |
393 | ;? |
396 | ;? |
394 | ;------------------------------------------------------------------------------ |
397 | ;------------------------------------------------------------------------------ |
- | 398 | mov byte [window_data + 0x20 + WDATA.cl_titlebar + 3], 1 ; desktop is not movable |
|
395 | push eax ecx |
399 | push eax ecx |
396 | xor eax, eax |
400 | xor eax, eax |
397 | mov ecx, WIN_STACK |
401 | mov ecx, WIN_STACK |
398 | @@: inc eax |
402 | @@: inc eax |
399 | add ecx, 2 |
403 | add ecx, 2 |
Line 1034... | Line 1038... | ||
1034 | mov edi, esi |
1038 | mov edi, esi |
1035 | shl edi, 5 |
1039 | shl edi, 5 |
1036 | add edi, window_data |
1040 | add edi, window_data |
Line 1037... | Line 1041... | ||
1037 | 1041 | ||
- | 1042 | ; can window change its height? |
|
1038 | ; can window change its height? |
1043 | ; only types 2 and 3 can be resized |
1039 | mov dl, [edi + WDATA.fl_wstyle] |
- | |
1040 | and dl, 0x0f |
1044 | mov dl, [edi + WDATA.fl_wstyle] |
1041 | cmp dl, 0x04 |
1045 | test dl, 2 |
Line 1042... | Line 1046... | ||
1042 | je .exit |
1046 | jz .exit |
1043 | 1047 | ||
1044 | ; toggle normal/maximized window state |
1048 | ; toggle normal/maximized window state |
Line 1220... | Line 1224... | ||
1220 | ;> edi = pointer to WDATA struct |
1224 | ;> edi = pointer to WDATA struct |
1221 | ;------------------------------------------------------------------------------ |
1225 | ;------------------------------------------------------------------------------ |
1222 | push eax ebx |
1226 | push eax ebx |
Line 1223... | Line 1227... | ||
1223 | 1227 | ||
- | 1228 | ; TODO: do we really need `draw_limits`? |
|
1224 | ; TODO: do we really need `draw_limits`? |
1229 | ; Yes, they are used by background drawing code. |
1225 | mov ecx, [eax + BOX.left] |
1230 | mov ecx, [eax + BOX.left] |
1226 | mov edx, [ebx + BOX.left] |
1231 | mov edx, [ebx + BOX.left] |
1227 | cmp ecx, edx |
1232 | cmp ecx, edx |
1228 | jle @f |
1233 | jle @f |
1229 | xchg ecx, edx |
1234 | mov ecx, edx |
- | 1235 | @@: mov [draw_limits.left], ecx |
|
1230 | @@: mov [draw_limits.left], ecx |
1236 | mov ecx, [eax + BOX.left] |
1231 | mov ecx, [eax + BOX.width] |
1237 | add ecx, [eax + BOX.width] |
- | 1238 | add edx, [ebx + BOX.width] |
|
1232 | cmp ecx, [ebx + BOX.width] |
1239 | cmp ecx, edx |
1233 | jae @f |
- | |
1234 | mov ecx, [ebx + BOX.width] |
1240 | jae @f |
1235 | @@: add ecx, edx |
1241 | mov ecx, edx |
1236 | mov [draw_limits.right], ecx |
1242 | @@: mov [draw_limits.right], ecx |
1237 | mov ecx, [eax + BOX.top] |
1243 | mov ecx, [eax + BOX.top] |
1238 | mov edx, [ebx + BOX.top] |
1244 | mov edx, [ebx + BOX.top] |
1239 | cmp ecx, edx |
1245 | cmp ecx, edx |
1240 | jle @f |
1246 | jle @f |
1241 | xchg ecx, edx |
1247 | mov ecx, edx |
- | 1248 | @@: mov [draw_limits.top], ecx |
|
1242 | @@: mov [draw_limits.top], ecx |
1249 | mov ecx, [eax + BOX.top] |
1243 | mov ecx, [eax + BOX.height] |
1250 | add ecx, [eax + BOX.height] |
- | 1251 | add edx, [ebx + BOX.height] |
|
1244 | cmp ecx, [ebx + BOX.height] |
1252 | cmp ecx, edx |
1245 | jae @f |
- | |
1246 | mov ecx, [ebx + BOX.height] |
1253 | jae @f |
1247 | @@: add ecx, edx |
1254 | mov ecx, edx |
Line 1248... | Line 1255... | ||
1248 | mov [draw_limits.bottom], ecx |
1255 | @@: mov [draw_limits.bottom], ecx |
1249 | 1256 | ||
1250 | ; recalculate screen buffer at old position |
1257 | ; recalculate screen buffer at old position |
1251 | push ebx |
1258 | push ebx |
Line 1431... | Line 1438... | ||
1431 | mov edi, eax |
1438 | mov edi, eax |
Line 1432... | Line 1439... | ||
1432 | 1439 | ||
1433 | ; was it already defined before? |
1440 | ; was it already defined before? |
1434 | test [edi + WDATA.fl_wdrawn], 1 |
1441 | test [edi + WDATA.fl_wdrawn], 1 |
- | 1442 | jnz .set_client_box |
|
Line 1435... | Line 1443... | ||
1435 | jnz .set_client_box |
1443 | or [edi + WDATA.fl_wdrawn], 1 |
1436 | 1444 | ||
1437 | ; NOTE: commented out since doesn't provide necessary functionality |
1445 | ; NOTE: commented out since doesn't provide necessary functionality |
1438 | ; anyway, to be reworked |
1446 | ; anyway, to be reworked |