Added a private field to B_MOUSE_DOWN message to know whose BView::MouseDown() method to call
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11238 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// Copyright (c) 2001-2002, Haiku, Inc.
|
// Copyright (c) 2001-2005, Haiku, Inc.
|
||||||
//
|
//
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a
|
// Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
// copy of this software and associated documentation files (the "Software"),
|
// copy of this software and associated documentation files (the "Software"),
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
//
|
//
|
||||||
// File Name: WinBorder.cpp
|
// File Name: WinBorder.cpp
|
||||||
// Author: DarkWyrm <[email protected]>
|
// Author: DarkWyrm <[email protected]>
|
||||||
// Adi Oanca <adioanca@mymail.ro>
|
// Adi Oanca <adioanca@cotty.iren.ro>
|
||||||
// Description: Layer subclass which handles window management
|
// Description: Layer subclass which handles window management
|
||||||
//
|
//
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
@@ -41,6 +41,7 @@
|
|||||||
#include "Globals.h"
|
#include "Globals.h"
|
||||||
#include "RootLayer.h"
|
#include "RootLayer.h"
|
||||||
#include "Workspace.h"
|
#include "Workspace.h"
|
||||||
|
#include "TokenSpace.h"
|
||||||
|
|
||||||
// Toggle general function call output
|
// Toggle general function call output
|
||||||
//#define DEBUG_WINBORDER
|
//#define DEBUG_WINBORDER
|
||||||
@@ -219,17 +220,16 @@ void WinBorder::MouseDown(PointerEvent& evt, bool sendMessage)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (sendMessage){
|
else if (sendMessage && target && target != fTopLayer){
|
||||||
BMessage msg;
|
BMessage msg;
|
||||||
msg.what= B_MOUSE_DOWN;
|
msg.what = B_MOUSE_DOWN;
|
||||||
msg.AddInt64("when", evt.when);
|
msg.AddInt64("when", evt.when);
|
||||||
msg.AddPoint("where", evt.where);
|
msg.AddPoint("where", evt.where);
|
||||||
msg.AddInt32("modifiers", evt.modifiers);
|
msg.AddInt32("modifiers", evt.modifiers);
|
||||||
msg.AddInt32("buttons", evt.buttons);
|
msg.AddInt32("buttons", evt.buttons);
|
||||||
msg.AddInt32("clicks", evt.clicks);
|
msg.AddInt32("clicks", evt.clicks);
|
||||||
|
msg.AddInt32("haiku:token", target? target->fViewToken: B_NULL_TOKEN);
|
||||||
// TODO: figure out how to specify the target
|
|
||||||
// msg.AddInt32("token", token);
|
|
||||||
Window()->SendMessageToClient(&msg);
|
Window()->SendMessageToClient(&msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user