fix click on window activation, fix background redraw, cleaning

git-svn-id: svn://kolibrios.org@6585 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
pathoswithin 2016-10-10 11:31:49 +00:00
parent 22e2a5b010
commit e47ae79991
3 changed files with 132 additions and 148 deletions

View File

@ -335,176 +335,163 @@ diff16 "end of .data segment",0,$
align 16 align 16
cur_saved_data: cur_saved_data:
rb 4096 rb 4096
fpu_data: fpu_data:
rb 512 rb 512
draw_data:
rb 32*256
BPSLine_calc_area rd 1440
d_width_calc_area rd 1140
mouseunder rd 16*24
mem_block_list rd 64*2 mem_block_list rd 64*2
mem_used_list rd 64*2 mem_used_list rd 64*2
mem_hash_cnt rd 64 mem_hash_cnt rd 64
thr_slot_map rd 8 thr_slot_map rd 8
cpu_freq rq 1
heap_mutex MUTEX
heap_size rd 1
heap_free rd 1
heap_blocks rd 1
free_blocks rd 1
mem_block_mask rd 2
next_memblock rd 1
mst MEM_STATE
pte_valid_mask rd 1
page_start rd 1
page_end rd 1
sys_page_map rd 1
os_stack_seg rd 1
srv.fd rd 1
srv.bk rd 1
align 16
_display display_t _display display_t
bios_fb FRB bios_fb FRB
LFBAddress dd ? mst MEM_STATE
SCR_MODE rw 2 cpu_freq dq ?
PUTPIXEL dd ? heap_mutex MUTEX
GETPIXEL dd ? heap_size dd ?
heap_free dd ?
heap_blocks dd ?
free_blocks dd ?
mem_block_mask rd 2
next_memblock dd ?
pte_valid_mask dd ?
page_start dd ?
page_end dd ?
sys_page_map dd ?
os_stack_seg dd ?
srv.fd dd ?
srv.bk dd ?
LFBAddress dd ?
PUTPIXEL dd ?
GETPIXEL dd ?
if VESA_1_2_VIDEO if VESA_1_2_VIDEO
BANK_SWITCH rd 1 reserved for vesa 1.2 BANK_SWITCH dd ? ; reserved for vesa 1.2
BANK_RW rd 1 BANK_RW dd ?
end if end if
REDRAW_BACKGROUND rb 4 MOUSE_PICTURE dd ?
align 4 def_cursor dd ?
draw_data: rb 32*256 def_cursor_clock dd ?
BPSLine_calc_area rd 1440 current_cursor dd ?
d_width_calc_area rd 1140 hw_cursor dd ?
cur_saved_base dd ?
mouseunder rd 16*24 cur.lock dd ? ; 1 - lock update, 2- hide
cur.left dd ? ; cursor clip box
cur.top dd ?
cur.w dd ?
cur.h dd ?
MOUSE_PICTURE dd ? ipc_tmp dd ?
ipc_pdir dd ?
ipc_ptab dd ?
MOUSE_SCROLL_H rw 1 proc_mem_map dd ?
MOUSE_X: rw 1 proc_mem_pdir dd ?
MOUSE_Y: rw 1 proc_mem_tab dd ?
MOUSE_SCROLL_V rw 1
X_UNDER rw 1 tmp_task_ptab dd ?
Y_UNDER rw 1
COLOR_TEMP rd 1
MOUSE_COLOR_MEM rd 1
BTN_DOWN: rb 4 default_io_map dd ?
align 4 LFBSize dd ?
def_cursor rd 1
def_cursor_clock rd 1
current_cursor rd 1
hw_cursor rd 1
cur_saved_base rd 1
cur.lock rd 1 ;1 - lock update, 2- hide current_process dd ?
cur.left rd 1 ;cursor clip box current_slot dd ? ; i.e. cureent thread
cur.top rd 1
cur.w rd 1
cur.h rd 1
ipc_tmp rd 1
ipc_pdir rd 1
ipc_ptab rd 1
proc_mem_map rd 1
proc_mem_pdir rd 1
proc_mem_tab rd 1
tmp_task_ptab rd 1
default_io_map rd 1
LFBSize rd 1
current_process rd 1
current_slot rd 1 ; i.e. cureent thread
; status
hd1_status rd 1 ; 0 - free : other - pid
application_table_owner rd 1 ; 0 - free : other - pid
application_table_mutex MUTEX
; device addresses ; device addresses
mididp rd 1 mididp dd ?
midisp rd 1 midisp dd ?
cdbase rd 1 cdbase dd ?
cdid rd 1 cdid dd ?
hdbase rd 1 ; for boot 0x1f0 hdbase dd ? ; for boot 0x1f0
hdid rd 1 hdid dd ?
hdpos rd 1 ; for boot 0x1 hdpos dd ? ; for boot 0x1
cdpos rd 1 cdpos dd ?
;CPUID information ;CPUID information
cpu_vendor rd 3 cpu_vendor rd 3
cpu_sign rd 1 cpu_sign dd ?
cpu_info rd 1 cpu_info dd ?
cpu_caps rd 4 cpu_caps rd 4
pg_data PG_DATA
heap_test dd ?
pg_data PG_DATA skin_data dd ?
heap_test rd 1
buttontype rd 1 mouse_active dd ?
windowtypechanged rd 1 mouse_pause dd ?
hd_entries rd 1 ;unused ? 0xfe10 BgrDrawMode dd ?
BgrDataWidth dd ?
BgrDataHeight dd ?
mouse_active rd 1 buttontype dd ?
mouse_pause rd 1 windowtypechanged dd ?
redrawmouse_unconditional rd 1 debug_step_pointer dd ?
img_background rd 1 lba_read_enabled dd ? ; 0 = disabled , 1 = enabled
mem_BACKGROUND rd 1 pci_access_enabled dd ? ; 0 = disabled , 1 = enabled
static_background_data rd 1
BgrDrawMode rd 1 NumBiosDisks dd ?
BgrDataWidth rd 1 BiosDisksData rb 200h
BgrDataHeight rd 1 BiosDiskCaches rb 80h*(cache_ide1-cache_ide0)
BiosDiskPartitions rd 80h
skin_data rd 1 img_background dd ?
mem_BACKGROUND dd ?
static_background_data dd ?
debug_step_pointer rd 1 hd1_status dd ? ; 0 - free : other - pid
application_table_owner dd ? ; 0 - free : other - pid
application_table_mutex MUTEX
lba_read_enabled rd 1 ; 0 = disabled , 1 = enabled redrawmouse_unconditional dd ?
pci_access_enabled rd 1 ; 0 = disabled , 1 = enabled
cpu_phys_addr_width rb 1 ; also known as MAXPHYADDR in Intel manuals MOUSE_SCROLL_H rw 1
hdd_appl_data rb 1 ; 0 = system cache, 1 - application cache MOUSE_X: rw 1
cd_appl_data rb 1 ; 0 = system cache, 1 - application cache MOUSE_Y: rw 1
MOUSE_SCROLL_V rw 1
timer_ticks_enable rb 1 ; for cd driver X_UNDER rw 1
Y_UNDER rw 1
COLOR_TEMP dd ?
MOUSE_COLOR_MEM dd ?
align 4 SCR_MODE rw 2
NumBiosDisks rd 1
BiosDisksData rb 200h BTN_DOWN: rb 4
BiosDiskCaches rb 80h*(cache_ide1-cache_ide0)
BiosDiskPartitions rd 80h cpu_phys_addr_width db ? ; also known as MAXPHYADDR in Intel manuals
hdd_appl_data db ? ; 0 = system cache, 1 - application cache
cd_appl_data db ? ; 0 = system cache, 1 - application cache
timer_ticks_enable db ? ; for cd driver
REDRAW_BACKGROUND db ?
align 16 align 16
DRIVE_DATA: rb DRIVE_DATA_SIZE DRIVE_DATA: rb DRIVE_DATA_SIZE
IncludeUGlobals IncludeUGlobals
@ -520,16 +507,18 @@ org (OS_BASE+0x0100000)
; This should be revisited when/if memory map would become more dynamic. ; This should be revisited when/if memory map would become more dynamic.
RAMDISK_CAPACITY = 2880 ; in sectors RAMDISK_CAPACITY = 2880 ; in sectors
RAMDISK: rb RAMDISK_CAPACITY*512 RAMDISK:
rb RAMDISK_CAPACITY*512
_CLEAN_ZONE: _CLEAN_ZONE:
BgrAuxTable rb 32768 BgrAuxTable rb 32768
align 65536 align 65536
SB16Buffer rb 65536 SB16Buffer rb 65536
align 4096 align 4096
BUTTON_INFO rb 64*1024 BUTTON_INFO rb 64*1024
RESERVED_PORTS: rb 64*1024 RESERVED_PORTS:
rb 64*1024
sys_pgmap: rb 1024*1024/8 sys_pgmap:
rb 1024*1024/8

View File

@ -59,11 +59,6 @@ mouse_check_events:
; yes it is, activate window user is pointing at, if needed ; yes it is, activate window user is pointing at, if needed
call mouse._.activate_sys_window_under_cursor call mouse._.activate_sys_window_under_cursor
; NOTE: this code wouldn't be necessary if we knew
; that window did already redraw itself after call above
or eax, eax
jnz .exit
; is there any system button under cursor? ; is there any system button under cursor?
call mouse._.find_sys_button_under_cursor call mouse._.find_sys_button_under_cursor
or eax, eax or eax, eax

View File

@ -2975,7 +2975,7 @@ nosb8:
mov [draw_data+32 + RECT.right], ecx mov [draw_data+32 + RECT.right], ecx
mov [draw_data+32 + RECT.bottom], edx mov [draw_data+32 + RECT.bottom], edx
inc byte[REDRAW_BACKGROUND] inc [REDRAW_BACKGROUND]
call wakeup_osloop call wakeup_osloop
;-------------------------------------- ;--------------------------------------
align 4 align 4
@ -3004,7 +3004,7 @@ force_redraw_background:
mov [draw_data+32 + RECT.right], eax mov [draw_data+32 + RECT.right], eax
mov [draw_data+32 + RECT.bottom], ebx mov [draw_data+32 + RECT.bottom], ebx
pop ebx eax pop ebx eax
inc byte[REDRAW_BACKGROUND] inc [REDRAW_BACKGROUND]
call wakeup_osloop call wakeup_osloop
ret ret
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
@ -3573,7 +3573,7 @@ align 4
;-------------------------------------- ;--------------------------------------
align 4 align 4
mouse_not_active: mouse_not_active:
cmp byte[REDRAW_BACKGROUND], 0 ; background update ? cmp [REDRAW_BACKGROUND], 0 ; background update ?
jz nobackgr jz nobackgr
cmp [background_defined], 0 cmp [background_defined], 0
@ -3635,7 +3635,7 @@ set_bgr_event:
loop set_bgr_event loop set_bgr_event
pop edi ecx pop edi ecx
;--------- set event 5 stop ----------- ;--------- set event 5 stop -----------
dec byte[REDRAW_BACKGROUND] ; got new update request? dec [REDRAW_BACKGROUND] ; got new update request?
jnz backgr jnz backgr
xor eax, eax xor eax, eax
@ -3794,7 +3794,7 @@ bgli:
cmp dword[esp], 1 cmp dword[esp], 1
jnz .az jnz .az
cmp byte[REDRAW_BACKGROUND], 0 cmp [REDRAW_BACKGROUND], 0
jz .az jz .az
mov dl, 0 mov dl, 0
@ -3835,7 +3835,7 @@ align 4
;-------------------------------------- ;--------------------------------------
align 4 align 4
@@: @@:
add byte[REDRAW_BACKGROUND], dl add [REDRAW_BACKGROUND], dl
call wakeup_osloop call wakeup_osloop
jmp newdw8 jmp newdw8
;-------------------------------------- ;--------------------------------------
@ -3857,7 +3857,7 @@ align 4
cmp dword [esp], 1 cmp dword [esp], 1
jne nobgrd jne nobgrd
inc byte[REDRAW_BACKGROUND] inc [REDRAW_BACKGROUND]
call wakeup_osloop call wakeup_osloop
;-------------------------------------- ;--------------------------------------
align 4 align 4
@ -3943,8 +3943,8 @@ calculatebackground: ; background
mov ecx, [_display.win_map_size] mov ecx, [_display.win_map_size]
shr ecx, 2 shr ecx, 2
rep stosd rep stosd
mov byte[window_data+32+WDATA.z_modif], ZPOS_DESKTOP
mov byte[REDRAW_BACKGROUND], 0 ; do not draw background! mov [REDRAW_BACKGROUND], 0
ret ret
;----------------------------------------------------------------------------- ;-----------------------------------------------------------------------------
uglobal uglobal