if (dx < 0) s_x += -dx;
if (dy < 0) s_y += -dy;
- if (dx > 0) d_x = dx + offset.x;
- if (dy > 0) d_y = dy + offset.y;
+ if (dx > 0) d_x += dx + offset.x;
+ if (dy > 0) d_y += dy + offset.y;
XCopyArea( xdisplay, xwindow, xwindow, xgc, s_x, s_y, w, h, d_x, d_y );
// This calls the UI-update mechanism (querying windows for
// menu/toolbar/control state information)
- if (wxUpdateUIEvent::CanUpdate((wxWindow*) this))
+ if (wxUpdateUIEvent::CanUpdate((wxWindow*) this) && IsShown())
UpdateWindowUI(wxUPDATE_UI_FROMIDLE);
// Set the input focus if couldn't do it before