Index: src/news_gui.cpp =================================================================== --- src/news_gui.cpp (revision 27829) +++ src/news_gui.cpp (working copy) @@ -181,7 +181,7 @@ /* Caption + close box. The caption is no WWT_CAPTION as the window shall not be moveable and so on. */ NWidget(NWID_HORIZONTAL), NWidget(WWT_CLOSEBOX, COLOUR_LIGHT_BLUE, WID_N_CLOSEBOX), - NWidget(WWT_EMPTY, COLOUR_LIGHT_BLUE, WID_N_CAPTION), SetFill(1, 0), + NWidget(WWT_CAPTION, COLOUR_LIGHT_BLUE, WID_N_CAPTION), SetDataTip(STR_NEWS_MESSAGE_CAPTION, STR_NULL), SetFill(1, 0), EndContainer(), /* Main part */ @@ -269,7 +269,7 @@ this->chat_height = (w != NULL) ? w->height : 0; this->status_height = FindWindowById(WC_STATUS_BAR, 0)->height; - this->flags |= WF_DISABLE_VP_SCROLL; + this->flags |= WF_DISABLE_VP_SCROLL | WF_DISABLE_DRAGGING; this->CreateNestedTree(); @@ -359,10 +359,6 @@ virtual void DrawWidget(const Rect &r, int widget) const { switch (widget) { - case WID_N_CAPTION: - DrawCaption(r, COLOUR_LIGHT_BLUE, this->owner, STR_NEWS_MESSAGE_CAPTION); - break; - case WID_N_PANEL: this->DrawNewsBorder(r); break; Index: src/widget.cpp =================================================================== --- src/widget.cpp (revision 27831) +++ src/widget.cpp (working copy) @@ -537,7 +537,7 @@ * @param owner 'Owner' of the window. * @param str Text to draw in the bar. */ -void DrawCaption(const Rect &r, Colours colour, Owner owner, StringID str) +static void DrawCaption(const Rect &r, Colours colour, Owner owner, StringID str) { bool company_owned = owner < MAX_COMPANIES; Index: src/window.cpp =================================================================== --- src/window.cpp (revision 27829) +++ src/window.cpp (working copy) @@ -691,6 +691,7 @@ return; case WWT_CAPTION: // 'Title bar' + if (w->flags & WF_DISABLE_DRAGGING) break; StartWindowDrag(w); return; @@ -697,6 +698,7 @@ case WWT_RESIZEBOX: /* When the resize widget is on the left size of the window * we assume that that button is used to resize to the left. */ + if (w->flags & WF_DISABLE_DRAGGING) break; StartWindowSizing(w, (int)nw->pos_x < (w->width / 2)); nw->SetDirty(w); return; Index: src/window_gui.h =================================================================== --- src/window_gui.h (revision 27829) +++ src/window_gui.h (working copy) @@ -142,7 +142,6 @@ /* widget.cpp */ void DrawFrameRect(int left, int top, int right, int bottom, Colours colour, FrameFlags flags); -void DrawCaption(const Rect &r, Colours colour, Owner owner, StringID str); /* window.cpp */ extern Window *_z_front_window; @@ -242,6 +241,7 @@ WF_WHITE_BORDER = 1 << 8, ///< Window white border counter bit mask. WF_HIGHLIGHTED = 1 << 9, ///< Window has a widget that has a highlight. WF_CENTERED = 1 << 10, ///< Window is centered and shall stay centered after ReInit. + WF_DISABLE_DRAGGING = 1 << 11, ///< Window cannot be dragged. }; DECLARE_ENUM_AS_BIT_SET(WindowFlags)