git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Merge branch 'master' of git://git.ucc.asn.au/tpg/acess2
[tpg/acess2.git]
/
Usermode
/
Applications
/
axwin3_src
/
WM
/
wm.c
diff --git
a/Usermode/Applications/axwin3_src/WM/wm.c
b/Usermode/Applications/axwin3_src/WM/wm.c
index
f039460
..
8886af1
100644
(file)
--- a/
Usermode/Applications/axwin3_src/WM/wm.c
+++ b/
Usermode/Applications/axwin3_src/WM/wm.c
@@
-173,6
+173,8
@@
void WM_FocusWindow(tWindow *Destination)
{
struct sWndMsg_Bool _msg;
+ _SysDebug("WM_FocusWindow(%p)", Destination);
+
if( gpWM_FocusedWindow == Destination )
return ;
if( Destination && !(Destination->Flags & WINFLAG_SHOW) )
@@
-292,8
+294,9
@@
int WM_MoveWindow(tWindow *Window, int X, int Y)
_SysDebug("WM_MoveWindow: (%i,%i)", X, Y);
Window->X = X; Window->Y = Y;
- // TODO: Why invalidate buffer?
- WM_Invalidate(Window);
+ // Mark up the tree that a child window has changed
+ while( (Window = Window->Parent) )
+ Window->Flags &= ~WINFLAG_CHILDCLEAN;
return 0;
}
@@
-407,6
+410,17
@@
void WM_int_UpdateWindow(tWindow *Window)
if( !(Window->Flags & WINFLAG_SHOW) )
return ;
+ if( (Window->Flags & WINFLAG_RELATIVE) && Window->Parent )
+ {
+ Window->RealX = Window->Parent->RealX + Window->Parent->BorderL + Window->X;
+ Window->RealY = Window->Parent->RealY + Window->Parent->BorderT + Window->Y;
+ }
+ else
+ {
+ Window->RealX = Window->X;
+ Window->RealY = Window->Y;
+ }
+
// Render
if( !(Window->Flags & WINFLAG_CLEAN) )
{
@@
-428,17
+442,6
@@
void WM_int_UpdateWindow(tWindow *Window)
Window->RealW = Window->W;
Window->RealH = Window->H;
}
-
- if( (Window->Flags & WINFLAG_RELATIVE) && Window->Parent )
- {
- Window->RealX = Window->Parent->RealX + Window->Parent->BorderL + Window->X;
- Window->RealY = Window->Parent->RealY + Window->Parent->BorderT + Window->Y;
- }
- else
- {
- Window->RealX = Window->X;
- Window->RealY = Window->Y;
- }
Window->Renderer->Redraw(Window);
Window->Flags |= WINFLAG_CLEAN;
@@
-466,6
+469,18
@@
void WM_int_BlitWindow(tWindow *Window)
// Ignore hidden windows
if( !(Window->Flags & WINFLAG_SHOW) )
return ;
+
+ // Duplicated position update to handle window moving
+ if( (Window->Flags & WINFLAG_RELATIVE) && Window->Parent )
+ {
+ Window->RealX = Window->Parent->RealX + Window->Parent->BorderL + Window->X;
+ Window->RealY = Window->Parent->RealY + Window->Parent->BorderT + Window->Y;
+ }
+ else
+ {
+ Window->RealX = Window->X;
+ Window->RealY = Window->Y;
+ }
// _SysDebug("Blit %p (%p) to (%i,%i) %ix%i", Window, Window->RenderBuffer,
// Window->RealX, Window->RealY, Window->RealW, Window->RealH);
UCC
git Repository :: git.ucc.asn.au