Index: src/bridge_gui.cpp =================================================================== --- src/bridge_gui.cpp (revision 20204) +++ src/bridge_gui.cpp (working copy) @@ -158,6 +158,16 @@ delete bridges; } + virtual Point OnInitialPosition(const WindowDesc *desc, int16 sm_width, int16 sm_height, int window_number) + { + /* position the window hopefully so the top bridge is under the mouse + pointer, but clamp it to fit on the screen. */ + Point corner; // point of the top left corner of the window. + corner.y = Clamp(_cursor.pos.y - 30, GetMainViewTop(), GetMainViewBottom()); + corner.x = Clamp(_cursor.pos.x - 16, 0, _screen.width); + return corner; + } + virtual void OnPaint() { this->DrawWidgets(); @@ -291,7 +301,7 @@ /* Set the default size of the Build Bridge Window */ uint16 BuildBridgeWindow::last_size = 4; /* Set the default sorting for the bridges */ -Listing BuildBridgeWindow::last_sorting = {false, 0}; +Listing BuildBridgeWindow::last_sorting = {true, 2}; /* Availible bridge sorting functions */ GUIBridgeList::SortFunction * const BuildBridgeWindow::sorter_funcs[] = {