fix bug that transparent widget may not be updated in event handler(#431)

This commit is contained in:
Jinhao
2019-05-13 04:28:30 +08:00
parent 5c19c9a9c3
commit 5575a9f2b8
6 changed files with 65 additions and 41 deletions

View File

@@ -1,7 +1,7 @@
/**
* A Bedrock Implementation
* Nana C++ Library(http://www.nanapro.org)
* Copyright(C) 2003-2018 Jinhao(cnjinhao@hotmail.com)
* Copyright(C) 2003-2019 Jinhao(cnjinhao@hotmail.com)
*
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at
@@ -43,6 +43,20 @@ namespace detail
class flag_guard;
/// RAII class for window message processing
class root_guard
{
public:
/// Enables lazy_update
root_guard(bedrock& brock, basic_window* root_wd);
/// Disables lazy-update and clears update requesters queue.
~root_guard();
private:
bedrock& brock_;
basic_window* const root_wd_;
};
~bedrock();
void pump_event(window, bool is_modal);
void flush_surface(core_window_t*, bool forced, const rectangle* update_area = nullptr);

View File

@@ -117,6 +117,7 @@ namespace detail
void map(core_window_t*, bool forced, const rectangle* update_area = nullptr);
bool update(core_window_t*, bool redraw, bool force, const rectangle* update_area = nullptr);
void update_requesters(core_window_t* root_wd);
void refresh_tree(core_window_t*);
void do_lazy_refresh(core_window_t*, bool force_copy_to_screen, bool refresh_tree = false);