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:
@@ -21,6 +21,7 @@
|
|||||||
#include "ServerApp.h"
|
#include "ServerApp.h"
|
||||||
#include "ServerWindow.h"
|
#include "ServerWindow.h"
|
||||||
#include "Workspace.h"
|
#include "Workspace.h"
|
||||||
|
#include "WorkspacesLayer.h"
|
||||||
|
|
||||||
#include <WindowPrivate.h>
|
#include <WindowPrivate.h>
|
||||||
|
|
||||||
@@ -706,7 +707,7 @@ WindowLayer::EnableUpdateRequests()
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
WindowLayer::MouseDown(BMessage* msg, BPoint where, int32* _viewToken)
|
WindowLayer::MouseDown(BMessage* message, BPoint where, int32* _viewToken)
|
||||||
{
|
{
|
||||||
// TODO: move into Decorator
|
// TODO: move into Decorator
|
||||||
if (!fBorderRegionValid)
|
if (!fBorderRegionValid)
|
||||||
@@ -719,7 +720,7 @@ WindowLayer::MouseDown(BMessage* msg, BPoint where, int32* _viewToken)
|
|||||||
click_type action = DEC_DRAG;
|
click_type action = DEC_DRAG;
|
||||||
|
|
||||||
if (fDecorator)
|
if (fDecorator)
|
||||||
action = _ActionFor(msg);
|
action = _ActionFor(message);
|
||||||
|
|
||||||
// deactivate border buttons on first click (select)
|
// deactivate border buttons on first click (select)
|
||||||
if (!IsFocus() && action != DEC_MOVETOBACK
|
if (!IsFocus() && action != DEC_MOVETOBACK
|
||||||
@@ -806,12 +807,17 @@ WindowLayer::MouseDown(BMessage* msg, BPoint where, int32* _viewToken)
|
|||||||
fDesktop->ActivateWindow(this);
|
fDesktop->ActivateWindow(this);
|
||||||
|
|
||||||
// eat the click if we don't accept first click
|
// eat the click if we don't accept first click
|
||||||
if ((Flags() & (B_WILL_ACCEPT_FIRST_CLICK | B_AVOID_FOCUS)) != 0)
|
if ((Flags() & (B_WILL_ACCEPT_FIRST_CLICK | B_AVOID_FOCUS)) == 0)
|
||||||
*_viewToken = view->Token();
|
return;
|
||||||
} else {
|
|
||||||
// always fill out view token if we already have focus
|
|
||||||
*_viewToken = view->Token();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -286,7 +286,7 @@ WorkspacesLayer::Draw(DrawingEngine* drawingEngine, BRegion* effectiveClipping,
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
WorkspacesLayer::MouseDown(BMessage* message, BPoint where, int32* _viewToken)
|
WorkspacesLayer::MouseDown(BMessage* message, BPoint where)
|
||||||
{
|
{
|
||||||
int32 columns, rows;
|
int32 columns, rows;
|
||||||
_GetGrid(columns, rows);
|
_GetGrid(columns, rows);
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ class WorkspacesLayer : public ViewLayer {
|
|||||||
BRegion* effectiveClipping,
|
BRegion* effectiveClipping,
|
||||||
BRegion* windowContentClipping,
|
BRegion* windowContentClipping,
|
||||||
bool deep = false);
|
bool deep = false);
|
||||||
virtual void MouseDown(BMessage* message, BPoint where, int32* _viewToken);
|
virtual void MouseDown(BMessage* message, BPoint where);
|
||||||
|
|
||||||
void WindowChanged(WindowLayer* window);
|
void WindowChanged(WindowLayer* window);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user