diff --git a/source/gui/detail/native_window_interface.cpp b/source/gui/detail/native_window_interface.cpp index 8d3dd9c8..fcf7f695 100644 --- a/source/gui/detail/native_window_interface.cpp +++ b/source/gui/detail/native_window_interface.cpp @@ -848,12 +848,17 @@ namespace nana{ #endif } - void native_interface::refresh_window(native_window_type wd) + void native_interface::refresh_window(native_window_type native_wd) { #if defined(NANA_WINDOWS) - ::InvalidateRect(reinterpret_cast(wd), nullptr, true); + auto wd = reinterpret_cast(native_wd); + RECT r; + ::GetClientRect(wd, &r); + ::InvalidateRect(wd, &r, FALSE); #elif defined(NANA_X11) - static_cast(wd); //eliminate unused parameter compiler warning. + Display * disp = restrict::spec.open_display(); + ::XClearArea(disp, reinterpret_cast(native_wd), 0, 0, 1, 1, true); + ::XFlush(disp); #endif } @@ -1110,14 +1115,10 @@ namespace nana{ if(owner && (owner != reinterpret_cast(restrict::spec.root_window()))) { auto origin = window_position(owner); -#if 0 - x += origin.x; - y += origin.y; -#else + auto owner_extents = window_frame_extents(owner); x += origin.x + owner_extents.left; y += origin.y + owner_extents.top; -#endif } ::XMoveResizeWindow(disp, reinterpret_cast(wd), x, y, r.width, r.height); diff --git a/source/gui/detail/window_manager.cpp b/source/gui/detail/window_manager.cpp index 9d8ebd65..c9184053 100644 --- a/source/gui/detail/window_manager.cpp +++ b/source/gui/detail/window_manager.cpp @@ -1091,6 +1091,12 @@ namespace detail std::lock_guard lock(mutex_); if (impl_->wd_register.available(wd) == false) return false; + if ((wd->other.category == category::flags::root) && wd->is_draw_through()) + { + native_interface::refresh_window(wd->root); + return true; + } + if (wd->displayed()) { using paint_operation = window_layer::paint_operation; diff --git a/source/gui/programming_interface.cpp b/source/gui/programming_interface.cpp index 1f3ac8c9..9791d2fd 100644 --- a/source/gui/programming_interface.cpp +++ b/source/gui/programming_interface.cpp @@ -962,7 +962,6 @@ namespace API restrict::wd_manager().update(reinterpret_cast(wd), false, true); } - void window_caption(window wd, const std::string& title_utf8) { throw_not_utf8(title_utf8);