* Changed mouse down behavior for all mouse modes while dragging a window: now
a second click on the right mouse button will raise the window again. * Desktop::SendWindowBehind() now locks a bit earlier, as some of the things it did shouln't really be done without holding a lock (depending from where it was called). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37922 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
6eba591215
commit
691749c0a3
@ -167,9 +167,12 @@ DefaultWindowBehaviour::MouseDown(BMessage* message, BPoint where)
|
||||
fWindow->RegionPool()->Recycle(visibleBorder);
|
||||
}
|
||||
|
||||
if (action == CLICK_MOVE_TO_BACK)
|
||||
fDesktop->SendWindowBehind(fWindow);
|
||||
else {
|
||||
if (action == CLICK_MOVE_TO_BACK) {
|
||||
if (!fIsDragging || fWindow != fDesktop->BackWindow())
|
||||
fDesktop->SendWindowBehind(fWindow);
|
||||
else
|
||||
fDesktop->ActivateWindow(fWindow);
|
||||
} else {
|
||||
fDesktop->SetMouseEventWindow(fWindow);
|
||||
|
||||
// activate window if in click to activate mode, else only focus it
|
||||
|
@ -1029,13 +1029,17 @@ Desktop::ActivateWindow(Window* window)
|
||||
void
|
||||
Desktop::SendWindowBehind(Window* window, Window* behindOf)
|
||||
{
|
||||
if (!LockAllWindows())
|
||||
return;
|
||||
|
||||
// TODO: should the "not in current workspace" be handled anyway?
|
||||
// (the code below would have to be changed then, though)
|
||||
if (window == BackWindow()
|
||||
|| !window->InWorkspace(fCurrentWorkspace)
|
||||
|| (behindOf != NULL && !behindOf->InWorkspace(fCurrentWorkspace))
|
||||
|| !LockAllWindows())
|
||||
|| (behindOf != NULL && !behindOf->InWorkspace(fCurrentWorkspace))) {
|
||||
UnlockAllWindows();
|
||||
return;
|
||||
}
|
||||
|
||||
// Is this a valid behindOf window?
|
||||
if (behindOf != NULL && window->HasInSubset(behindOf))
|
||||
|
Loading…
x
Reference in New Issue
Block a user