Some more cleanup:

- replaced fMsgSender/Receiver with a BPortLink fLink
- moved message loop into non-static method _MessageLooper()
- renamed Zoom()/Minimize()/Quit()/ScreenModeChanged() to Notify*(), and
  Quit() to NotfiyQuitRequested() to make more clear what they do (they
  don't operate on ServerWindow, they just notify its client)
- less insane way to init a window: there is no longer the constructor
  and a separate method Init(); now there is the constructor (which
  fully sets up the window), InitCheck(), and Run() which runs the
  window's message loop
- moved the quitting stuff into a separate method Quit() and made
  it callable from other threads.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13247 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2005-06-23 22:43:11 +00:00
parent 4801a9a97d
commit ce1639b2bf
4 changed files with 289 additions and 221 deletions
+6 -4
View File
@@ -6,6 +6,8 @@
* Adi Oanca <[email protected]>
* Stephan Aßmus <[email protected]>
*/
#include <Locker.h>
#include <Region.h>
#include <String.h>
@@ -476,21 +478,21 @@ WinBorder::MouseUp(const PointerEvent& event)
fIsZooming = false;
fDecorator->SetZoom(false);
if (action == DEC_ZOOM)
Window()->Zoom();
Window()->NotifyZoom();
return;
}
if (fIsClosing) {
fIsClosing = false;
fDecorator->SetClose(false);
if (action == DEC_CLOSE)
Window()->Quit();
Window()->NotifyQuitRequested();
return;
}
if (fIsMinimizing) {
fIsMinimizing = false;
fDecorator->SetMinimize(false);
if (action == DEC_MINIMIZE)
Window()->Minimize(true);
Window()->NotifyMinimize(true);
return;
}
}
@@ -696,4 +698,4 @@ void WinBorder::get_user_regions(BRegion &reg)
reg.Include(&fDecRegion);
}
#endif
#endif