Ticket #4721: app_server_flags_4721.patch
File app_server_flags_4721.patch, 3.7 KB (added by , 15 years ago) |
---|
-
src/servers/app/Window.cpp
781 781 int32 modifiers = _ExtractModifiers(message); 782 782 bool inBorderRegion = fBorderRegion.Contains(where); 783 783 bool windowModifier = (fFlags & B_NO_SERVER_SIDE_WINDOW_MODIFIERS) == 0 784 && (~modifiers & (B_COMMAND_KEY | B_CONTROL_KEY)) == 0; 784 && (modifiers & (B_COMMAND_KEY | B_CONTROL_KEY 785 | B_OPTION_KEY | B_SHIFT_KEY)) 786 == B_COMMAND_KEY | B_CONTROL_KEY; 785 787 786 // default action is to drag the Window787 if (windowModifier || inBorderRegion) {788 // clicking Window visible area789 790 click_type action = DEC_NONE;788 // get special action if any (drag, resize etc) 789 click_type action = DEC_NONE; 790 791 if (inBorderRegion || windowModifier) { 792 // clicking window title bar/borders, or windowModifier keys are down 791 793 int32 buttons = _ExtractButtons(message); 792 794 793 795 if (inBorderRegion && fDecorator != NULL) … … 803 805 // non-floating window doesn't have focus 804 806 if (!IsFocus() && !IsFloating() && action != DEC_MOVETOBACK 805 807 && action != DEC_RESIZE && action != DEC_SLIDETAB) 806 action = DEC_DRAG; 808 action = (fFlags & B_NOT_MOVABLE) ? DEC_NONE : DEC_DRAG; 809 } 810 811 // let clicks caught by windowModifier through to window if no special 812 // action would take place anyway, e.g. if window is not movable. 813 if (inBorderRegion || (windowModifier && action != DEC_NONE)) { 807 814 808 815 // set decorator internals 809 816 switch (action) { … … 1530 1537 } 1531 1538 1532 1539 1533 /*! Returns w ether or not a window is in the workspace list with the1540 /*! Returns whether or not a window is in the workspace list with the 1534 1541 specified \a index. 1535 1542 */ 1536 1543 bool … … 1847 1854 /*static*/ uint32 1848 1855 Window::ValidWindowFlags() 1849 1856 { 1850 return B_NOT_MOVABLE | B_NOT_CLOSABLE | B_NOT_ZOOMABLE 1851 | B_NOT_MINIMIZABLE | B_NOT_RESIZABLE 1852 | B_NOT_H_RESIZABLE | B_NOT_V_RESIZABLE 1853 | B_AVOID_FRONT | B_AVOID_FOCUS 1854 | B_WILL_ACCEPT_FIRST_CLICK | B_OUTLINE_RESIZE 1855 | B_NO_WORKSPACE_ACTIVATION 1856 | B_NOT_ANCHORED_ON_ACTIVATE 1857 | B_ASYNCHRONOUS_CONTROLS 1858 | B_QUIT_ON_WINDOW_CLOSE 1859 | B_SAME_POSITION_IN_ALL_WORKSPACES 1860 | kWindowScreenFlag; 1857 return (B_VALID_WINDOW_FLAGS | kWindowScreenFlag); 1861 1858 } 1862 1859 1863 1860 -
headers/os/interface/Window.h
32 32 B_FLOATING_WINDOW = 21 33 33 }; 34 34 35 // must update app_server's IsValidLook() when changing 35 36 enum window_look { 36 37 B_BORDERED_WINDOW_LOOK = 20, 37 38 B_NO_BORDER_WINDOW_LOOK = 19, … … 41 42 B_FLOATING_WINDOW_LOOK = 7 42 43 }; 43 44 45 // must update app_server's IsValidFeel() when changing 44 46 enum window_feel { 45 47 B_NORMAL_WINDOW_FEEL = 0, 46 48 B_MODAL_SUBSET_WINDOW_FEEL = 2, … … 78 80 B_CLOSE_ON_ESCAPE = 0x00800000, 79 81 B_NO_SERVER_SIDE_WINDOW_MODIFIERS = 0x00000200 80 82 }; 83 // combination of all flags from above 84 #define B_VALID_WINDOW_FLAGS (B_NOT_MOVABLE | B_NOT_CLOSABLE | \ 85 B_NOT_ZOOMABLE | B_NOT_MINIMIZABLE | \ 86 B_NOT_RESIZABLE | B_NOT_H_RESIZABLE | \ 87 B_NOT_V_RESIZABLE | B_AVOID_FRONT | \ 88 B_AVOID_FOCUS | B_WILL_ACCEPT_FIRST_CLICK | \ 89 B_OUTLINE_RESIZE | B_NO_WORKSPACE_ACTIVATION | \ 90 B_NOT_ANCHORED_ON_ACTIVATE | B_ASYNCHRONOUS_CONTROLS | \ 91 B_QUIT_ON_WINDOW_CLOSE | B_SAME_POSITION_IN_ALL_WORKSPACES | \ 92 B_AUTO_UPDATE_SIZE_LIMITS | \ 93 B_CLOSE_ON_ESCAPE | \ 94 B_NO_SERVER_SIDE_WINDOW_MODIFIERS) 81 95 82 96 #define B_CURRENT_WORKSPACE 0 83 97 #define B_ALL_WORKSPACES 0xffffffff