Mercurial > hg > openttd
changeset 10998:a1d256bf72e0 draft
(svn r15338) -Fix [FS#2598]: close all construction related windows whenever changing company.
author | rubidium <rubidium@openttd.org> |
---|---|
date | Wed, 04 Feb 2009 16:59:41 +0000 |
parents | 0692d0966f52 |
children | cf0b4df5833f |
files | src/airport_gui.cpp src/autoreplace_gui.cpp src/bridge_gui.cpp src/build_vehicle_gui.cpp src/cheat_gui.cpp src/company_cmd.cpp src/company_gui.cpp src/dock_gui.cpp src/engine_gui.cpp src/industry_gui.cpp src/network/network_client.cpp src/openttd.cpp src/order_gui.cpp src/rail_gui.cpp src/road_gui.cpp src/signs_gui.cpp src/station_gui.cpp src/terraform_gui.cpp src/timetable_gui.cpp src/tree_gui.cpp src/vehicle_gui.cpp src/window.cpp src/window_func.h src/window_gui.h |
diffstat | 24 files changed, 64 insertions(+), 43 deletions(-) [+] |
line wrap: on
line diff
--- a/src/airport_gui.cpp +++ b/src/airport_gui.cpp @@ -141,7 +141,7 @@ static const WindowDesc _air_toolbar_desc = { WDP_ALIGN_TBR, 22, 64, 36, 64, 36, WC_BUILD_TOOLBAR, WC_NONE, - WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON, + WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON | WDF_CONSTRUCTION, _air_toolbar_widgets, }; @@ -302,7 +302,7 @@ static const WindowDesc _build_airport_desc = { WDP_AUTO, WDP_AUTO, 148, 240, 148, 240, WC_BUILD_STATION, WC_BUILD_TOOLBAR, - WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET, + WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_CONSTRUCTION, _build_airport_picker_widgets, };
--- a/src/autoreplace_gui.cpp +++ b/src/autoreplace_gui.cpp @@ -472,14 +472,14 @@ static const WindowDesc _replace_rail_vehicle_desc = { WDP_AUTO, WDP_AUTO, 456, 140, 456, 140, WC_REPLACE_VEHICLE, WC_NONE, - WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_STICKY_BUTTON | WDF_RESIZABLE, + WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_STICKY_BUTTON | WDF_RESIZABLE | WDF_CONSTRUCTION, _replace_vehicle_widgets, }; static const WindowDesc _replace_vehicle_desc = { WDP_AUTO, WDP_AUTO, 456, 118, 456, 118, WC_REPLACE_VEHICLE, WC_NONE, - WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_STICKY_BUTTON | WDF_RESIZABLE, + WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_STICKY_BUTTON | WDF_RESIZABLE | WDF_CONSTRUCTION, _replace_vehicle_widgets, };
--- a/src/bridge_gui.cpp +++ b/src/bridge_gui.cpp @@ -270,7 +270,7 @@ static const WindowDesc _build_bridge_desc = { WDP_AUTO, WDP_AUTO, 200, 114, 200, 114, WC_BUILD_BRIDGE, WC_BUILD_TOOLBAR, - WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_RESIZABLE, + WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_RESIZABLE | WDF_CONSTRUCTION, _build_bridge_widgets, };
--- a/src/build_vehicle_gui.cpp +++ b/src/build_vehicle_gui.cpp @@ -1182,7 +1182,7 @@ static const WindowDesc _build_vehicle_desc = { WDP_AUTO, WDP_AUTO, 240, 174, 240, 256, WC_BUILD_VEHICLE, WC_NONE, - WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_RESIZABLE, + WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_RESIZABLE | WDF_CONSTRUCTION, _build_vehicle_widgets, };
--- a/src/cheat_gui.cpp +++ b/src/cheat_gui.cpp @@ -46,8 +46,6 @@ while ((uint)p1 < GetCompanyPoolSize()) { if (IsValidCompanyID((CompanyID)p1)) { SetLocalCompany((CompanyID)p1); - - MarkWholeScreenDirty(); return _local_company; } p1 += p2;
--- a/src/company_cmd.cpp +++ b/src/company_cmd.cpp @@ -83,6 +83,12 @@ _settings_client.gui.autorenew_money = c->engine_renew_money; InvalidateWindow(WC_GAME_OPTIONS, 0); } + + /* Delete any construction windows... */ + DeleteConstructionWindows(); + + /* ... and redraw the whole screen. */ + MarkWholeScreenDirty(); } bool IsHumanCompany(CompanyID company)
--- a/src/company_gui.cpp +++ b/src/company_gui.cpp @@ -1096,7 +1096,7 @@ static const WindowDesc _select_company_manager_face_desc = { WDP_AUTO, WDP_AUTO, 190, 163, 190, 163, WC_COMPANY_MANAGER_FACE, WC_NONE, - WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS, + WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_CONSTRUCTION, _select_company_manager_face_widgets, }; @@ -1104,7 +1104,7 @@ static const WindowDesc _select_company_manager_face_adv_desc = { WDP_AUTO, WDP_AUTO, 220, 220, 220, 220, WC_COMPANY_MANAGER_FACE, WC_NONE, - WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS, + WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_CONSTRUCTION, _select_company_manager_face_adv_widgets, }; @@ -1518,7 +1518,7 @@ static const WindowDesc _buy_company_desc = { 153, 171, 334, 137, 334, 137, WC_BUY_COMPANY, WC_NONE, - WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET, + WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_CONSTRUCTION, _buy_company_widgets, };
--- a/src/dock_gui.cpp +++ b/src/dock_gui.cpp @@ -276,7 +276,7 @@ static const WindowDesc _build_docks_toolbar_desc = { WDP_ALIGN_TBR, 22, 160, 36, 160, 36, WC_BUILD_TOOLBAR, WC_NONE, - WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON, + WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON | WDF_CONSTRUCTION, _build_docks_toolb_widgets, }; @@ -311,7 +311,7 @@ static const WindowDesc _build_docks_scen_toolbar_desc = { WDP_AUTO, WDP_AUTO, 115, 36, 115, 36, WC_SCEN_BUILD_TOOLBAR, WC_NONE, - WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON, + WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON | WDF_CONSTRUCTION, _build_docks_scen_toolb_widgets, }; @@ -397,7 +397,7 @@ static const WindowDesc _build_dock_station_desc = { WDP_AUTO, WDP_AUTO, 148, 75, 148, 75, WC_BUILD_STATION, WC_BUILD_TOOLBAR, - WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET, + WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_CONSTRUCTION, _build_dock_station_widgets, }; @@ -471,7 +471,7 @@ static const WindowDesc _build_docks_depot_desc = { WDP_AUTO, WDP_AUTO, 204, 86, 204, 86, WC_BUILD_DEPOT, WC_BUILD_TOOLBAR, - WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET, + WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_CONSTRUCTION, _build_docks_depot_widgets, };
--- a/src/engine_gui.cpp +++ b/src/engine_gui.cpp @@ -99,7 +99,7 @@ static const WindowDesc _engine_preview_desc = { WDP_CENTER, WDP_CENTER, 300, 192, 300, 192, WC_ENGINE_PREVIEW, WC_NONE, - WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET, + WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_CONSTRUCTION, _engine_preview_widgets, };
--- a/src/industry_gui.cpp +++ b/src/industry_gui.cpp @@ -88,7 +88,7 @@ static const WindowDesc _build_industry_desc = { WDP_AUTO, WDP_AUTO, 170, 212, 170, 212, WC_BUILD_INDUSTRY, WC_NONE, - WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_RESIZABLE, + WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_RESIZABLE | WDF_CONSTRUCTION, _build_industry_widgets, };
--- a/src/network/network_client.cpp +++ b/src/network/network_client.cpp @@ -846,10 +846,6 @@ if (client_id == _network_own_client_id) { _network_playas = company_id; SetLocalCompany(company_id); - - /* Disable any buttons in any windows the client is now not supposed to get to, and do it fast. */ - /* Do this ASAP else the client has a chance of sending DoCommands with an incorrect company_id (=kick)! */ - MarkWholeScreenDirty(); } return NETWORK_RECV_STATUS_OKAY;
--- a/src/openttd.cpp +++ b/src/openttd.cpp @@ -351,7 +351,6 @@ _pause_game = 0; _cursor.fix_at = false; - MarkWholeScreenDirty(); CheckForMissingGlyphsInLoadedLanguagePack(); @@ -792,8 +791,6 @@ static void MakeNewEditorWorldDone() { SetLocalCompany(OWNER_NONE); - - MarkWholeScreenDirty(); } static void MakeNewEditorWorld()
--- a/src/order_gui.cpp +++ b/src/order_gui.cpp @@ -1274,7 +1274,7 @@ static const WindowDesc _other_orders_desc = { WDP_AUTO, WDP_AUTO, 386, 88, 386, 88, WC_VEHICLE_ORDERS, WC_VEHICLE_VIEW, - WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_STICKY_BUTTON | WDF_RESIZABLE, + WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_STICKY_BUTTON | WDF_RESIZABLE | WDF_CONSTRUCTION, _other_orders_widgets, };
--- a/src/rail_gui.cpp +++ b/src/rail_gui.cpp @@ -793,7 +793,7 @@ static const WindowDesc _build_rail_desc = { WDP_ALIGN_TBR, 22, 350, 36, 350, 36, WC_BUILD_TOOLBAR, WC_NONE, - WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON, + WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON | WDF_CONSTRUCTION, _build_rail_widgets, }; @@ -1335,7 +1335,7 @@ static const WindowDesc _station_builder_desc = { WDP_AUTO, WDP_AUTO, 148, 200, 148, 200, WC_BUILD_STATION, WC_BUILD_TOOLBAR, - WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET, + WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_CONSTRUCTION, _station_builder_widgets, }; @@ -1343,7 +1343,7 @@ static const WindowDesc _newstation_builder_desc = { WDP_AUTO, WDP_AUTO, 148, 290, 148, 290, WC_BUILD_STATION, WC_BUILD_TOOLBAR, - WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET, + WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_CONSTRUCTION, _newstation_builder_widgets, }; @@ -1512,7 +1512,7 @@ static const WindowDesc _signal_builder_desc = { WDP_AUTO, WDP_AUTO, 154, 68, 154, 68, WC_BUILD_SIGNAL, WC_BUILD_TOOLBAR, - WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS, + WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_CONSTRUCTION, _signal_builder_widgets, }; @@ -1586,7 +1586,7 @@ static const WindowDesc _build_depot_desc = { WDP_AUTO, WDP_AUTO, 140, 122, 140, 122, WC_BUILD_DEPOT, WC_BUILD_TOOLBAR, - WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET, + WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_CONSTRUCTION, _build_depot_widgets, }; @@ -1687,7 +1687,7 @@ static const WindowDesc _build_waypoint_desc = { WDP_AUTO, WDP_AUTO, 344, 92, 344, 92, WC_BUILD_DEPOT, WC_BUILD_TOOLBAR, - WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET, + WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_CONSTRUCTION, _build_waypoint_widgets, };
--- a/src/road_gui.cpp +++ b/src/road_gui.cpp @@ -644,7 +644,7 @@ static const WindowDesc _build_road_desc = { WDP_ALIGN_TBR, 22, 263, 36, 263, 36, WC_BUILD_TOOLBAR, WC_NONE, - WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON, + WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON | WDF_CONSTRUCTION, _build_road_widgets, }; @@ -672,7 +672,7 @@ static const WindowDesc _build_tramway_desc = { WDP_ALIGN_TBR, 22, 241, 36, 241, 36, WC_BUILD_TOOLBAR, WC_NONE, - WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON, + WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON | WDF_CONSTRUCTION, _build_tramway_widgets, }; @@ -708,7 +708,7 @@ static const WindowDesc _build_road_scen_desc = { WDP_AUTO, WDP_AUTO, 197, 36, 197, 36, WC_SCEN_BUILD_TOOLBAR, WC_NONE, - WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON, + WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON | WDF_CONSTRUCTION, _build_road_scen_widgets, }; @@ -787,7 +787,7 @@ static const WindowDesc _build_road_depot_desc = { WDP_AUTO, WDP_AUTO, 140, 122, 140, 122, WC_BUILD_DEPOT, WC_BUILD_TOOLBAR, - WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET, + WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_CONSTRUCTION, _build_road_depot_widgets, }; @@ -935,7 +935,7 @@ static const WindowDesc _rv_station_picker_desc = { WDP_AUTO, WDP_AUTO, 207, 177, 207, 177, WC_BUS_STATION, WC_BUILD_TOOLBAR, - WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET, + WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_CONSTRUCTION, _rv_station_picker_widgets, };
--- a/src/signs_gui.cpp +++ b/src/signs_gui.cpp @@ -332,7 +332,7 @@ static const WindowDesc _query_sign_edit_desc = { 190, 170, 260, 42, 260, 42, WC_QUERY_STRING, WC_NONE, - WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET, + WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_CONSTRUCTION, _query_sign_edit_widgets, };
--- a/src/station_gui.cpp +++ b/src/station_gui.cpp @@ -1210,7 +1210,7 @@ static const WindowDesc _select_station_desc = { WDP_AUTO, WDP_AUTO, 200, 92, 200, 182, WC_SELECT_STATION, WC_NONE, - WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_RESIZABLE, + WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_RESIZABLE | WDF_CONSTRUCTION, _select_station_widgets, };
--- a/src/terraform_gui.cpp +++ b/src/terraform_gui.cpp @@ -328,7 +328,7 @@ static const WindowDesc _terraform_desc = { WDP_ALIGN_TBR, 22 + 36, 158, 36, 158, 36, WC_SCEN_LAND_GEN, WC_NONE, - WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON, + WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON | WDF_CONSTRUCTION, _terraform_widgets, }; @@ -709,7 +709,7 @@ static const WindowDesc _scen_edit_land_gen_desc = { WDP_AUTO, WDP_AUTO, 163, 103, 163, 103, WC_SCEN_LAND_GEN, WC_NONE, - WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON, + WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON | WDF_CONSTRUCTION, _scen_edit_land_gen_widgets, };
--- a/src/timetable_gui.cpp +++ b/src/timetable_gui.cpp @@ -357,7 +357,7 @@ static const WindowDesc _timetable_desc = { WDP_AUTO, WDP_AUTO, 400, 130, 400, 130, WC_VEHICLE_TIMETABLE, WC_VEHICLE_VIEW, - WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_STICKY_BUTTON | WDF_RESIZABLE, + WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_STICKY_BUTTON | WDF_RESIZABLE | WDF_CONSTRUCTION, _timetable_widgets, };
--- a/src/tree_gui.cpp +++ b/src/tree_gui.cpp @@ -174,7 +174,7 @@ static const WindowDesc _build_trees_desc = { WDP_AUTO, WDP_AUTO, 143, 184, 143, 184, WC_BUILD_TREES, WC_NONE, - WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET, + WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_CONSTRUCTION, _build_trees_widgets, };
--- a/src/vehicle_gui.cpp +++ b/src/vehicle_gui.cpp @@ -414,7 +414,7 @@ static const WindowDesc _vehicle_refit_desc = { WDP_AUTO, WDP_AUTO, 240, 174, 240, 174, WC_VEHICLE_REFIT, WC_VEHICLE_VIEW, - WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_RESIZABLE, + WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_RESIZABLE | WDF_CONSTRUCTION, _vehicle_refit_widgets, };
--- a/src/window.cpp +++ b/src/window.cpp @@ -2191,6 +2191,28 @@ } } +/** + * Delete all windows that are used for construction of vehicle etc. + * Once done with that invalidate the others to ensure they get refreshed too. + */ +void DeleteConstructionWindows() +{ + Window *w; + +restart_search: + /* When we find the window to delete, we need to restart the search + * as deleting this window could cascade in deleting (many) others + * anywhere in the z-array */ + FOR_ALL_WINDOWS_FROM_BACK(w) { + if (w->desc_flags & WDF_CONSTRUCTION) { + delete w; + goto restart_search; + } + } + + FOR_ALL_WINDOWS_FROM_BACK(w) w->SetDirty(); +} + /** Delete all always on-top windows to get an empty screen */ void HideVitalWindows() {
--- a/src/window_func.h +++ b/src/window_func.h @@ -28,6 +28,7 @@ void DeleteNonVitalWindows(); void DeleteAllNonVitalWindows(); +void DeleteConstructionWindows(); void HideVitalWindows(); void ShowVitalWindows();
--- a/src/window_gui.h +++ b/src/window_gui.h @@ -124,6 +124,7 @@ WDF_STD_TOOLTIPS = 1 << 0, ///< use standard routine when displaying tooltips WDF_DEF_WIDGET = 1 << 1, ///< Default widget control for some widgets in the on click event, @see DispatchLeftClickEvent() WDF_STD_BTN = 1 << 2, ///< Default handling for close and titlebar widgets (widget no 0 and 1) + WDF_CONSTRUCTION = 1 << 3, ///< This window is used for construction; close it whenever changing company. WDF_UNCLICK_BUTTONS = 1 << 4, ///< Unclick buttons when the window event times out WDF_STICKY_BUTTON = 1 << 5, ///< Set window to sticky mode; they are not closed unless closed with 'X' (widget 2)