X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/e7bc59fe98396b7c67024911b03bf1e08728df3e..36c626c631d1249dca3cd77514dd0a556473ed27:/Client/src/item_union.cpp diff --git a/Client/src/item_union.cpp b/Client/src/item_union.cpp index 4bfd2ff..27791a2 100644 --- a/Client/src/item_union.cpp +++ b/Client/src/item_union.cpp @@ -28,10 +28,13 @@ ViewUnion::~ViewUnion() bool ViewUnion::on_image_expose_event(GdkEventExpose *e) { - Glib::RefPtr colormap = image.get_colormap(); - colormap->alloc_color(color); + Glib::RefPtr colormap = Gtk::Widget::get_default_colormap(); + if (!colormap->alloc_color(color, false, false)) { + std::cout << "ERROR ALOCANDO COLOR!" << std::endl; + } gc->set_foreground(color); gc->set_background(color); + int w,h; w = image.get_width(); h = image.get_height();