Although it's not that clean, mouse clicks are now going through to the

WorkspacesLayer again.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15452 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2005-12-09 17:25:32 +00:00
parent ce8c4d79fc
commit 0b4b0f97ba
3 changed files with 15 additions and 9 deletions
+13 -7
View File
@@ -21,6 +21,7 @@
#include "ServerApp.h"
#include "ServerWindow.h"
#include "Workspace.h"
#include "WorkspacesLayer.h"
#include <WindowPrivate.h>
@@ -706,7 +707,7 @@ WindowLayer::EnableUpdateRequests()
void
WindowLayer::MouseDown(BMessage* msg, BPoint where, int32* _viewToken)
WindowLayer::MouseDown(BMessage* message, BPoint where, int32* _viewToken)
{
// TODO: move into Decorator
if (!fBorderRegionValid)
@@ -719,7 +720,7 @@ WindowLayer::MouseDown(BMessage* msg, BPoint where, int32* _viewToken)
click_type action = DEC_DRAG;
if (fDecorator)
action = _ActionFor(msg);
action = _ActionFor(message);
// deactivate border buttons on first click (select)
if (!IsFocus() && action != DEC_MOVETOBACK
@@ -806,12 +807,17 @@ WindowLayer::MouseDown(BMessage* msg, BPoint where, int32* _viewToken)
fDesktop->ActivateWindow(this);
// eat the click if we don't accept first click
if ((Flags() & (B_WILL_ACCEPT_FIRST_CLICK | B_AVOID_FOCUS)) != 0)
*_viewToken = view->Token();
} else {
// always fill out view token if we already have focus
*_viewToken = view->Token();
if ((Flags() & (B_WILL_ACCEPT_FIRST_CLICK | B_AVOID_FOCUS)) == 0)
return;
}
// fill out view token for the view under the mouse
*_viewToken = view->Token();
// TODO: that's not really a clean solution - maybe move that
// functionality back into the ViewLayer class
if (WorkspacesLayer* layer = dynamic_cast<WorkspacesLayer*>(view))
layer->MouseDown(message, where);
}
}
}
+1 -1
View File
@@ -286,7 +286,7 @@ WorkspacesLayer::Draw(DrawingEngine* drawingEngine, BRegion* effectiveClipping,
void
WorkspacesLayer::MouseDown(BMessage* message, BPoint where, int32* _viewToken)
WorkspacesLayer::MouseDown(BMessage* message, BPoint where)
{
int32 columns, rows;
_GetGrid(columns, rows);
+1 -1
View File
@@ -24,7 +24,7 @@ class WorkspacesLayer : public ViewLayer {
BRegion* effectiveClipping,
BRegion* windowContentClipping,
bool deep = false);
virtual void MouseDown(BMessage* message, BPoint where, int32* _viewToken);
virtual void MouseDown(BMessage* message, BPoint where);
void WindowChanged(WindowLayer* window);