Permalink
Browse files

fixed MW-1739 - FIX COMPILATION WITH GCC 6.2.1 (CONTRIBUTION)

Contribution submitted via Github by Christian Hesse from pull request #10
  • Loading branch information...
1 parent 1e957e9 commit dcfa27f296a348199559885fc0f651022e3ee734 @mbodzek mbodzek committed Oct 14, 2016
Showing with 4 additions and 3 deletions.
  1. +2 −2 library/forms/gtk/src/lf_popover.cpp
  2. +2 −1 library/forms/gtk/src/lf_popup.cpp
@@ -380,7 +380,7 @@ void PopoverWidget::show_popover(const int rx, const int ry, const mforms::Start
if (_style == mforms::PopoverStyleTooltip)
{
Glib::RefPtr<Gdk::Window> wnd = this->get_window();
- if (wnd != 0)
+ if (wnd)
{
int xx;
int yy;
@@ -396,7 +396,7 @@ void PopoverWidget::show_popover(const int rx, const int ry, const mforms::Start
{
Gdk::ModifierType mask;
Glib::RefPtr<Gdk::Display> dsp = Gdk::Display::get_default();
- if (dsp != 0)
+ if (dsp)
dsp->get_pointer(x, y, mask);
}
@@ -81,7 +81,8 @@ void PopupImpl::on_screen_changed(const Glib::RefPtr<Gdk::Screen>& screen)
{
d("\n");
Glib::RefPtr<Gdk::Colormap> colormap = screen->get_rgba_colormap();
- _have_rgba = colormap;
+ if (colormap)
+ _have_rgba = true;
if (!_have_rgba)
colormap = screen->get_rgb_colormap();

0 comments on commit dcfa27f

Please sign in to comment.