Merge branch 'hotfix-1.4.1' into develop

This commit is contained in:
Jinhao
2017-01-13 07:17:55 +08:00
26 changed files with 6060 additions and 5811 deletions

View File

@@ -57,7 +57,7 @@ typedef struct
class image_ico_ex
: public basic_image_pixbuf
{
bool _m_read_ico(const void* data, std::size_t size)
bool _m_read_ico(const void* data, std::size_t /*size*/)
{
auto width = 0;
auto height = 0;
@@ -94,7 +94,7 @@ class image_ico_ex
cursor += offset;
auto icon = reinterpret_cast<ICONIMAGE*>(cursor);
auto realBitsCount = static_cast<int>(icon->icHeader.biBitCount);
auto hasAndMask = (realBitsCount < 32) && (height != icon->icHeader.biHeight);
auto hasAndMask = (realBitsCount < 32) && (height != static_cast<int>(icon->icHeader.biHeight));
cursor += 40;
pixbuf_.open(width, height);
@@ -259,4 +259,4 @@ public:
}//end namespace paint
}//end namespace nana
#endif
#endif

View File

@@ -777,12 +777,22 @@ namespace paint
::ReleaseDC(reinterpret_cast<HWND>(dst), dc);
}
#elif defined(NANA_X11)
Display * display = nana::detail::platform_spec::instance().open_display();
auto & spec = nana::detail::platform_spec::instance();
Display * display = spec.open_display();
nana::detail::platform_scope_guard lock;
::XCopyArea(display,
impl_->handle->pixmap, reinterpret_cast<Window>(dst), impl_->handle->context,
sx, sy, width, height, dx, dy);
::XMapWindow(display, reinterpret_cast<Window>(dst));
XWindowAttributes attr;
spec.set_error_handler();
::XGetWindowAttributes(display, reinterpret_cast<Window>(dst), &attr);
if(BadWindow != spec.rev_error_handler() && attr.map_state != IsUnmapped)
::XMapWindow(display, reinterpret_cast<Window>(dst));
::XFlush(display);
#endif
}

View File

@@ -457,7 +457,8 @@ namespace nana{ namespace paint
HDC context = drawable->context;
HBITMAP pixmap = drawable->pixmap;
HBITMAP orig_bmp = pixmap;
HBITMAP orig_bmp = nullptr;
if(need_dup)
{
context = ::CreateCompatibleDC(drawable->context);
@@ -795,7 +796,8 @@ namespace nana{ namespace paint
std::unique_ptr<unsigned char[]> autoptr;
auto rgb_color = clr.px_color().value;
nana::pixel_color_t rgb_imd = { 0 };
nana::pixel_color_t rgb_imd = {};
if(fade)
{
autoptr = detail::alloc_fade_table(1 - fade_rate);