Author: stippi Date: 2009-10-06 11:29:26 +0200 (Tue, 06 Oct 2009) New Revision: 33458 Changeset: http://dev.haiku-os.org/changeset/33458/haiku Modified: haiku/trunk/src/servers/app/Window.cpp Log: 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. Modified: haiku/trunk/src/servers/app/Window.cpp =================================================================== --- haiku/trunk/src/servers/app/Window.cpp 2009-10-06 09:25:58 UTC (rev 33457) +++ haiku/trunk/src/servers/app/Window.cpp 2009-10-06 09:29:26 UTC (rev 33458) @@ -781,7 +781,8 @@ int32 modifiers = _ExtractModifiers(message); bool inBorderRegion = fBorderRegion.Contains(where); 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 if (windowModifier || inBorderRegion) { @@ -1530,7 +1531,7 @@ } -/*! 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. */ bool @@ -1847,16 +1848,25 @@ /*static*/ uint32 Window::ValidWindowFlags() { - return B_NOT_MOVABLE | B_NOT_CLOSABLE | B_NOT_ZOOMABLE - | B_NOT_MINIMIZABLE | 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 + return B_NOT_MOVABLE + | B_NOT_CLOSABLE + | B_NOT_ZOOMABLE + | B_NOT_MINIMIZABLE + | 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_NOT_ANCHORED_ON_ACTIVATE | B_ASYNCHRONOUS_CONTROLS | B_QUIT_ON_WINDOW_CLOSE | B_SAME_POSITION_IN_ALL_WORKSPACES + | B_AUTO_UPDATE_SIZE_LIMITS + | B_CLOSE_ON_ESCAPE + | B_NO_SERVER_SIDE_WINDOW_MODIFIERS | kWindowScreenFlag; }