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://localhost/acess2
[tpg/acess2.git]
/
Usermode
/
Applications
/
axwin3_src
/
WM
/
decorator.c
diff --git
a/Usermode/Applications/axwin3_src/WM/decorator.c
b/Usermode/Applications/axwin3_src/WM/decorator.c
index
14c0414
..
6600408
100644
(file)
--- a/
Usermode/Applications/axwin3_src/WM/decorator.c
+++ b/
Usermode/Applications/axwin3_src/WM/decorator.c
@@
-133,18
+133,31
@@
void Decorator_Redraw(tWindow *Window)
int Decorator_HandleMessage(tWindow *Window, int Message, int Length, const void *Data)
{
int Decorator_HandleMessage(tWindow *Window, int Message, int Length, const void *Data)
{
+ static tWindow *btn1_down;
switch(Message)
{
case WNDMSG_MOUSEMOVE: {
const struct sWndMsg_MouseMove *msg = Data;
switch(Message)
{
case WNDMSG_MOUSEMOVE: {
const struct sWndMsg_MouseMove *msg = Data;
+
+ if( btn1_down == Window ) {
+ WM_MoveWindow(Window, Window->X + msg->dX, Window->Y + msg->dY);
+ return 0;
+ }
+
if(msg->Y >= 0) return 1; // Pass
if(msg->Y >= 0) return 1; // Pass
-
+
// TODO: Handle
return 0; }
case WNDMSG_MOUSEBTN: {
const struct sWndMsg_MouseButton *msg = Data;
// TODO: Handle
return 0; }
case WNDMSG_MOUSEBTN: {
const struct sWndMsg_MouseButton *msg = Data;
+ if( msg->Button == 0 && !msg->bPressed )
+ btn1_down = 0;
+
if(msg->Y >= 0) return 1; // Pass
if(msg->Y >= 0) return 1; // Pass
-
+
+ if( msg->Button == 0 && msg->bPressed )
+ btn1_down = Window;
+
// TODO: Handle
return 0; }
default: // Anything unhandled is passed on
// TODO: Handle
return 0; }
default: // Anything unhandled is passed on
UCC
git Repository :: git.ucc.asn.au