* The BView archived the view's event mask - if the auto-raise feature was
enabled when the view got archived, the replicant inherited the event mask of the view. We now make sure the event mask is always set to 0. * This fixes bug #2566. * Minor cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27940 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -303,6 +303,10 @@ WorkspacesView::WorkspacesView(BRect frame)
|
|||||||
WorkspacesView::WorkspacesView(BMessage* archive)
|
WorkspacesView::WorkspacesView(BMessage* archive)
|
||||||
: BView(archive)
|
: BView(archive)
|
||||||
{
|
{
|
||||||
|
// Make sure the auto-raise feature didn't leave any artifacts - this is
|
||||||
|
// not a good idea to keep enabled for a replicant.
|
||||||
|
if (EventMask() != 0)
|
||||||
|
SetEventMask(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -379,19 +383,20 @@ void
|
|||||||
WorkspacesView::MouseMoved(BPoint where, uint32 transit,
|
WorkspacesView::MouseMoved(BPoint where, uint32 transit,
|
||||||
const BMessage* dragMessage)
|
const BMessage* dragMessage)
|
||||||
{
|
{
|
||||||
if (dynamic_cast<WorkspacesWindow*>(Window()) == NULL || EventMask() == 0)
|
WorkspacesWindow* window = dynamic_cast<WorkspacesWindow*>(Window());
|
||||||
|
if (window == NULL || !window->IsAutoRaising())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Auto-Raise
|
// Auto-Raise
|
||||||
|
|
||||||
where = ConvertToScreen(where);
|
where = ConvertToScreen(where);
|
||||||
BScreen screen(Window());
|
BScreen screen(window);
|
||||||
BRect frame = screen.Frame();
|
BRect frame = screen.Frame();
|
||||||
if (where.x == frame.left || where.x == frame.right
|
if (where.x == frame.left || where.x == frame.right
|
||||||
|| where.y == frame.top || where.y == frame.bottom) {
|
|| where.y == frame.top || where.y == frame.bottom) {
|
||||||
// cursor is on screen edge
|
// cursor is on screen edge
|
||||||
if (Window()->Frame().Contains(where))
|
if (window->Frame().Contains(where))
|
||||||
Window()->Activate();
|
window->Activate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user