[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1808169-disable-focus into lp:widelands
The proposal to merge lp:~widelands-dev/widelands/bug-1808169-disable-focus into lp:widelands has been updated. Status: Needs review => Merged For more details, see: https://code.launchpad.net/~widelands-dev/widelands/bug-1808169-disable-focus/+merge/361097 -- Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/bug-1808169-disable-focus. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1808169-disable-focus into lp:widelands
Again a Travis hiccup. @bunnybot merge force -- https://code.launchpad.net/~widelands-dev/widelands/bug-1808169-disable-focus/+merge/361097 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/bug-1808169-disable-focus. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1808169-disable-focus into lp:widelands
Refusing to merge, since Travis is not green. Use @bunnybot merge force for merging anyways. Travis build 4404. State: failed. Details: https://travis-ci.org/widelands/widelands/builds/479143097. -- https://code.launchpad.net/~widelands-dev/widelands/bug-1808169-disable-focus/+merge/361097 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/bug-1808169-disable-focus. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1808169-disable-focus into lp:widelands
Continuous integration builds have changed state: Travis build 4404. State: failed. Details: https://travis-ci.org/widelands/widelands/builds/479143097. Appveyor build 4195. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_bug_1808169_disable_focus-4195. -- https://code.launchpad.net/~widelands-dev/widelands/bug-1808169-disable-focus/+merge/361097 Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1808169-disable-focus into lp:widelands. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1808169-disable-focus into lp:widelands
Continuous integration builds have changed state: Travis build 4365. State: errored. Details: https://travis-ci.org/widelands/widelands/builds/472186290. Appveyor build 4158. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_bug_1808169_disable_focus-4158. -- https://code.launchpad.net/~widelands-dev/widelands/bug-1808169-disable-focus/+merge/361097 Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1808169-disable-focus into lp:widelands. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1808169-disable-focus into lp:widelands
I don't see a problem with how things are now. We will need to reconsider this though if we want to implement full keyboard navigation, e.g. tab through checkboxes and activate/deactivate them by hitting the space bar. -- https://code.launchpad.net/~widelands-dev/widelands/bug-1808169-disable-focus/+merge/361097 Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1808169-disable-focus into lp:widelands. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1808169-disable-focus into lp:widelands
Continuous integration builds have changed state: Travis build 4347. State: failed. Details: https://travis-ci.org/widelands/widelands/builds/469721440. Appveyor build 4141. State: failed. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_bug_1808169_disable_focus-4141. -- https://code.launchpad.net/~widelands-dev/widelands/bug-1808169-disable-focus/+merge/361097 Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1808169-disable-focus into lp:widelands. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1808169-disable-focus into lp:widelands
Notabilis has proposed merging lp:~widelands-dev/widelands/bug-1808169-disable-focus into lp:widelands. Commit message: Allowing hotkey usage while windows are open. Requested reviews: Widelands Developers (widelands-dev) Related bugs: Bug #1808169 in widelands: "scrolling not possible with arrow keys" https://bugs.launchpad.net/widelands/+bug/1808169 For more details, see: https://code.launchpad.net/~widelands-dev/widelands/bug-1808169-disable-focus/+merge/361097 Allowing to use arrow keys while windows (e.g., ware statistics) are open. Changed two points: - The UI::Panel no longer grabs the keyboard focus when it is clicked but shouldn't grab it - Some components (buttons, slider, checkbox) no longer accept the keyboard focus. I don't know why they ever did so, though. It possibly was connected to the Panel being able to switch between components with the Tab key. But since nearly no component handles any keys, I guess it is no (big) loss. But still my main problem with this merge request is: Does someone knows about or finds a functionality that breaks due to the no longer applied keyboard focus? -- Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1808169-disable-focus into lp:widelands. === modified file 'src/ui_basic/button.cc' --- src/ui_basic/button.cc 2018-12-13 07:24:01 + +++ src/ui_basic/button.cc 2018-12-18 20:42:33 + @@ -60,7 +60,8 @@ title_image_(title_image), background_style_(g_gr->styles().button_style(init_style)) { set_thinks(false); - set_can_focus(true); + // Don't allow focus + assert(!get_can_focus()); } Button::Button // for textual buttons. If h = 0, h will resize according to the font's height. @@ -143,8 +144,6 @@ if (enabled_ == on) return; - set_can_focus(on); - // disabled buttons should look different... if (on) enabled_ = true; @@ -316,7 +315,6 @@ return false; if (enabled_) { - focus(); grab_mouse(true); pressed_ = true; if (repeating_) { === modified file 'src/ui_basic/checkbox.cc' --- src/ui_basic/checkbox.cc 2018-12-13 07:24:01 + +++ src/ui_basic/checkbox.cc 2018-12-18 20:42:33 + @@ -50,7 +50,6 @@ uint16_t h = pic->height(); set_desired_size(w, h); set_size(w, h); - set_can_focus(true); set_flags(Has_Custom_Picture, true); } @@ -98,7 +97,6 @@ * Args: enabled true if the checkbox should be enabled, false otherwise */ void Statebox::set_enabled(bool const enabled) { - set_can_focus(enabled); if (((flags_ & Is_Enabled) > 1) && enabled) return; @@ -177,7 +175,6 @@ */ bool Statebox::handle_mousepress(const uint8_t btn, int32_t, int32_t) { if (btn == SDL_BUTTON_LEFT && (flags_ & Is_Enabled)) { - focus(); clicked(); return true; } === modified file 'src/ui_basic/panel.cc' --- src/ui_basic/panel.cc 2018-12-13 07:24:01 + +++ src/ui_basic/panel.cc 2018-12-18 20:42:33 + @@ -528,7 +528,7 @@ * \return true if the mouseclick was processed, false otherwise */ bool Panel::handle_mousepress(const uint8_t btn, int32_t, int32_t) { - if (btn == SDL_BUTTON_LEFT) { + if (btn == SDL_BUTTON_LEFT && get_can_focus()) { focus(); } return false; === modified file 'src/ui_basic/slider.cc' --- src/ui_basic/slider.cc 2018-12-13 07:24:01 + +++ src/ui_basic/slider.cc 2018-12-18 20:42:33 + @@ -78,7 +78,7 @@ bar_size_(bar_size), cursor_size_(cursor_size) { set_thinks(false); - set_can_focus(true); + assert(!get_can_focus()); calculate_cursor_position(); } @@ -205,7 +205,6 @@ if (enabled_ == enabled) return; - set_can_focus(enabled); enabled_ = enabled; if (!enabled) { pressed_ = false; @@ -402,7 +401,6 @@ if (btn != SDL_BUTTON_LEFT) return false; - focus(); if (x >= cursor_pos_ && x <= cursor_pos_ + cursor_size_) { // click on cursor cursor_pressed(x); @@ -469,7 +467,6 @@ if (btn != SDL_BUTTON_LEFT) return false; - focus(); if (y >= cursor_pos_ && y <= cursor_pos_ + cursor_size_) { // click on cursor cursor_pressed(y); ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp