* 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:
parent
82a6a6f3b2
commit
4682283fbd
@ -303,6 +303,10 @@ WorkspacesView::WorkspacesView(BRect frame)
|
||||
WorkspacesView::WorkspacesView(BMessage* 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,
|
||||
const BMessage* dragMessage)
|
||||
{
|
||||
if (dynamic_cast<WorkspacesWindow*>(Window()) == NULL || EventMask() == 0)
|
||||
WorkspacesWindow* window = dynamic_cast<WorkspacesWindow*>(Window());
|
||||
if (window == NULL || !window->IsAutoRaising())
|
||||
return;
|
||||
|
||||
// Auto-Raise
|
||||
|
||||
where = ConvertToScreen(where);
|
||||
BScreen screen(Window());
|
||||
BScreen screen(window);
|
||||
BRect frame = screen.Frame();
|
||||
if (where.x == frame.left || where.x == frame.right
|
||||
|| where.y == frame.top || where.y == frame.bottom) {
|
||||
// cursor is on screen edge
|
||||
if (Window()->Frame().Contains(where))
|
||||
Window()->Activate();
|
||||
if (window->Frame().Contains(where))
|
||||
window->Activate();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user