[Commits] [wesnoth/wesnoth] f49513: GUI2/Window: added getters for dispatcher and disp...

GitHub noreply at github.com
Sat Jul 29 22:36:41 UTC 2017


  Branch: refs/heads/accelerated_rendering
  Home:   https://github.com/wesnoth/wesnoth
  Commit: f49513f76e57a1d58f588e8e90cca91f3c86d911
      https://github.com/wesnoth/wesnoth/commit/f49513f76e57a1d58f588e8e90cca91f3c86d911
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-29 (Sat, 29 Jul 2017)

  Changed paths:
    M src/gui/widgets/window.hpp

  Log Message:
  -----------
  GUI2/Window: added getters for dispatcher and display mode


  Commit: 3202635f37434934c64db5e8e47558b666420622
      https://github.com/wesnoth/wesnoth/commit/3202635f37434934c64db5e8e47558b666420622
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-29 (Sat, 29 Jul 2017)

  Changed paths:
    M src/gui/widgets/window.cpp
    M src/gui/widgets/window.hpp

  Log Message:
  -----------
  GUI2/Window: added display mode flag for modeless windows

Previously they were using the modal flag.


  Commit: bbf63466e877c9b57bc708e52f9ffdec61e65db1
      https://github.com/wesnoth/wesnoth/commit/bbf63466e877c9b57bc708e52f9ffdec61e65db1
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-29 (Sat, 29 Jul 2017)

  Changed paths:
    M src/gui/core/event/handler.cpp
    M src/gui/core/event/handler.hpp
    M src/gui/dialogs/modal_dialog.cpp

  Log Message:
  -----------
  GUI2/Modal Dialog: don't use pop_back to remove window ptr from open window stack

This seems to have been the cause of some crashes and weird behavior with the new command console.
Likely the problem came from the wrong pointer being removed from the ows, but exactly why a modal
dialog was even being opened I don't know.

Still, this is a safer method overall and it guarantees the correct pointer is always removed.


  Commit: 8a38015b396d8abd3d8001bb875e259f145ee0a0
      https://github.com/wesnoth/wesnoth/commit/8a38015b396d8abd3d8001bb875e259f145ee0a0
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-29 (Sat, 29 Jul 2017)

  Changed paths:
    M src/gui/dialogs/modeless_dialog.cpp
    M src/gui/dialogs/modeless_dialog.hpp

  Log Message:
  -----------
  GUI2/Modeless Dialog: minor cleanup, implement a TODO

* Use a unique_ptr for the window member.
* Made use of the new remove_from_window_stack function (its impl was copied from this code)
* Only attempt ows removal if window display mode is modeless (since if mode is tooltip, no
  ptr was added to the list anyway.


Compare: https://github.com/wesnoth/wesnoth/compare/728fb47b83d5...8a38015b396d


More information about the Commits mailing list