* Removed outdated USE_MULTI_LOCKER build option
* Don't acquire the read-lock in WindowForClientLooperPort, since MultiLocker does not support nested read-locks. Use an assert instead, however the method does not appear to be used anywhere at the moment. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38224 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -64,9 +64,6 @@
|
||||
# define STRACE(a) ;
|
||||
#endif
|
||||
|
||||
#if !USE_MULTI_LOCKER
|
||||
# define AutoWriteLocker BAutolock
|
||||
#endif
|
||||
|
||||
class KeyboardFilter : public EventFilter {
|
||||
public:
|
||||
@@ -84,6 +81,7 @@ class KeyboardFilter : public EventFilter {
|
||||
bigtime_t fTimestamp;
|
||||
};
|
||||
|
||||
|
||||
class MouseFilter : public EventFilter {
|
||||
public:
|
||||
MouseFilter(Desktop* desktop);
|
||||
@@ -2487,7 +2485,7 @@ Desktop::AllWindows()
|
||||
Window*
|
||||
Desktop::WindowForClientLooperPort(port_id port)
|
||||
{
|
||||
AutoReadLocker locker(fWindowLock);
|
||||
ASSERT(fWindowLock.IsReadLocked());
|
||||
|
||||
for (Window* window = fAllWindows.FirstWindow(); window != NULL;
|
||||
window = window->NextWindow(kAllWindowList)) {
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include "DesktopSettings.h"
|
||||
#include "EventDispatcher.h"
|
||||
#include "MessageLooper.h"
|
||||
#include "MultiLocker.h"
|
||||
#include "Screen.h"
|
||||
#include "ScreenManager.h"
|
||||
#include "ServerCursor.h"
|
||||
@@ -36,15 +37,6 @@
|
||||
#include "WorkspacePrivate.h"
|
||||
|
||||
|
||||
#define USE_MULTI_LOCKER 1
|
||||
|
||||
#if USE_MULTI_LOCKER
|
||||
# include "MultiLocker.h"
|
||||
#else
|
||||
# include <Locker.h>
|
||||
#endif
|
||||
|
||||
|
||||
class BMessage;
|
||||
|
||||
class DrawingEngine;
|
||||
@@ -83,7 +75,6 @@ public:
|
||||
void KeyEvent(uint32 what, int32 key,
|
||||
int32 modifiers);
|
||||
// Locking
|
||||
#if USE_MULTI_LOCKER
|
||||
bool LockSingleWindow()
|
||||
{ return fWindowLock.ReadLock(); }
|
||||
void UnlockSingleWindow()
|
||||
@@ -95,17 +86,6 @@ public:
|
||||
{ fWindowLock.WriteUnlock(); }
|
||||
|
||||
const MultiLocker& WindowLocker() { return fWindowLock; }
|
||||
#else // USE_MULTI_LOCKER
|
||||
bool LockSingleWindow()
|
||||
{ return fWindowLock.Lock(); }
|
||||
void UnlockSingleWindow()
|
||||
{ fWindowLock.Unlock(); }
|
||||
|
||||
bool LockAllWindows()
|
||||
{ return fWindowLock.Lock(); }
|
||||
void UnlockAllWindows()
|
||||
{ fWindowLock.Unlock(); }
|
||||
#endif // USE_MULTI_LOCKER
|
||||
|
||||
// Mouse and cursor methods
|
||||
|
||||
@@ -257,7 +237,7 @@ public:
|
||||
void WriteWindowOrder(int32 workspace,
|
||||
BPrivate::LinkSender& sender);
|
||||
|
||||
//! The window lock has to be held when accessing a window list!
|
||||
//! The window lock must be held when accessing a window list!
|
||||
WindowList& CurrentWindows();
|
||||
WindowList& AllWindows();
|
||||
|
||||
@@ -351,11 +331,7 @@ private:
|
||||
|
||||
CursorManager fCursorManager;
|
||||
|
||||
#if USE_MULTI_LOCKER
|
||||
MultiLocker fWindowLock;
|
||||
#else
|
||||
BLocker fWindowLock;
|
||||
#endif
|
||||
|
||||
BRegion fBackgroundRegion;
|
||||
BRegion fScreenRegion;
|
||||
|
||||
Reference in New Issue
Block a user