Applied part of a patch from Caitlin Shaw (coding style cleaned up!):

* Trigger server side window modifiers only if exactly those modifiers are
  pressed.
* Add the new window flags defined in Window.h to what the server considers
  valid flags. Otherwise the new flags important to the server (only
  B_NO_SERVER_SIDE_WINDOW_MODIFIERS) get filtered out.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33458 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus
2009-10-06 09:29:26 +00:00
parent a1a5c7b1d1
commit a1d5d23476
+17 -7
View File
@@ -781,7 +781,8 @@ Window::MouseDown(BMessage* message, BPoint where, int32* _viewToken)
int32 modifiers = _ExtractModifiers(message); int32 modifiers = _ExtractModifiers(message);
bool inBorderRegion = fBorderRegion.Contains(where); bool inBorderRegion = fBorderRegion.Contains(where);
bool windowModifier = (fFlags & B_NO_SERVER_SIDE_WINDOW_MODIFIERS) == 0 bool windowModifier = (fFlags & B_NO_SERVER_SIDE_WINDOW_MODIFIERS) == 0
&& (~modifiers & (B_COMMAND_KEY | B_CONTROL_KEY)) == 0; && (modifiers & (B_COMMAND_KEY | B_CONTROL_KEY | B_OPTION_KEY
| B_SHIFT_KEY)) == B_COMMAND_KEY | B_CONTROL_KEY;
// default action is to drag the Window // default action is to drag the Window
if (windowModifier || inBorderRegion) { if (windowModifier || inBorderRegion) {
@@ -1530,7 +1531,7 @@ Window::SetFlags(uint32 flags, BRegion* updateRegion)
} }
/*! Returns wether or not a window is in the workspace list with the /*! Returns whether or not a window is in the workspace list with the
specified \a index. specified \a index.
*/ */
bool bool
@@ -1847,16 +1848,25 @@ Window::IsFloatingFeel(window_feel feel)
/*static*/ uint32 /*static*/ uint32
Window::ValidWindowFlags() Window::ValidWindowFlags()
{ {
return B_NOT_MOVABLE | B_NOT_CLOSABLE | B_NOT_ZOOMABLE return B_NOT_MOVABLE
| B_NOT_MINIMIZABLE | B_NOT_RESIZABLE | B_NOT_CLOSABLE
| B_NOT_H_RESIZABLE | B_NOT_V_RESIZABLE | B_NOT_ZOOMABLE
| B_AVOID_FRONT | B_AVOID_FOCUS | B_NOT_MINIMIZABLE
| B_WILL_ACCEPT_FIRST_CLICK | B_OUTLINE_RESIZE | B_NOT_RESIZABLE
| B_NOT_H_RESIZABLE
| B_NOT_V_RESIZABLE
| B_AVOID_FRONT
| B_AVOID_FOCUS
| B_WILL_ACCEPT_FIRST_CLICK
| B_OUTLINE_RESIZE
| B_NO_WORKSPACE_ACTIVATION | B_NO_WORKSPACE_ACTIVATION
| B_NOT_ANCHORED_ON_ACTIVATE | B_NOT_ANCHORED_ON_ACTIVATE
| B_ASYNCHRONOUS_CONTROLS | B_ASYNCHRONOUS_CONTROLS
| B_QUIT_ON_WINDOW_CLOSE | B_QUIT_ON_WINDOW_CLOSE
| B_SAME_POSITION_IN_ALL_WORKSPACES | B_SAME_POSITION_IN_ALL_WORKSPACES
| B_AUTO_UPDATE_SIZE_LIMITS
| B_CLOSE_ON_ESCAPE
| B_NO_SERVER_SIDE_WINDOW_MODIFIERS
| kWindowScreenFlag; | kWindowScreenFlag;
} }