Commit dded2fc9 authored by pwrd's avatar pwrd

Ge window objects, dirty wasn't reset

parent b987fdf8
...@@ -1025,7 +1025,7 @@ void GlowDrawGtk::event_handler(GdkEvent event) ...@@ -1025,7 +1025,7 @@ void GlowDrawGtk::event_handler(GdkEvent event)
event.expose.area.x + event.expose.area.width, event.expose.area.x + event.expose.area.width,
event.expose.area.y + event.expose.area.height); event.expose.area.y + event.expose.area.height);
end(); end();
ctx->is_dirty = 0; ctx->reset_dirty();
break; break;
case GDK_VISIBILITY_NOTIFY: case GDK_VISIBILITY_NOTIFY:
switch (event.visibility.state) { switch (event.visibility.state) {
...@@ -1183,7 +1183,7 @@ void GlowDrawGtk::event_handler(GdkEvent event) ...@@ -1183,7 +1183,7 @@ void GlowDrawGtk::event_handler(GdkEvent event)
event.expose.area.x + event.expose.area.width, event.expose.area.x + event.expose.area.width,
event.expose.area.y + event.expose.area.height); event.expose.area.y + event.expose.area.height);
end(); end();
ctx->is_dirty = 0; ctx->reset_dirty();
break; break;
case GDK_MOTION_NOTIFY: case GDK_MOTION_NOTIFY:
if (event.motion.is_hint) { if (event.motion.is_hint) {
......
...@@ -219,7 +219,7 @@ void QtScrollWidgetGlow::paintEvent(QPaintEvent* event) ...@@ -219,7 +219,7 @@ void QtScrollWidgetGlow::paintEvent(QPaintEvent* event)
ctx->draw(&ctx->navw, r.x(), r.y(), r.x() + r.width(), r.y() + r.height()); ctx->draw(&ctx->navw, r.x(), r.y(), r.x() + r.width(), r.y() + r.height());
draw_ctx->end(); draw_ctx->end();
} }
ctx->is_dirty = 0; ctx->reset_dirty();
} }
void QtScrollWidgetGlow::closeEvent(QCloseEvent* event) void QtScrollWidgetGlow::closeEvent(QCloseEvent* event)
......
...@@ -636,6 +636,7 @@ public: ...@@ -636,6 +636,7 @@ public:
//! Mark that window needs to be redrawn. //! Mark that window needs to be redrawn.
void set_dirty(); void set_dirty();
virtual void reset_dirty() {is_dirty = 0;}
int is_dirty; //!< Defered redraw is active. int is_dirty; //!< Defered redraw is active.
GlowArray a_nc; //!< Array of nodeclasses. GlowArray a_nc; //!< Array of nodeclasses.
......
...@@ -4535,3 +4535,16 @@ int GrowCtx::find_by_name(const char* name, GlowArrayElem** element) ...@@ -4535,3 +4535,16 @@ int GrowCtx::find_by_name(const char* name, GlowArrayElem** element)
->window_ctx->find_by_name(&name[len + 1], element); ->window_ctx->find_by_name(&name[len + 1], element);
} }
} }
void GrowCtx::reset_dirty()
{
is_dirty = 0;
if (has_subwindows) {
for (int i = 0; i < a.a_size; i++) {
if (a[i]->type() == glow_eObjectType_GrowWindow
|| a[i]->type() == glow_eObjectType_GrowFolder) {
((GrowWindow *)a[i])->reset_dirty();
}
}
}
}
...@@ -1098,6 +1098,8 @@ public: ...@@ -1098,6 +1098,8 @@ public:
glow_eTextCoding text_coding; //!< Text coding glow_eTextCoding text_coding; //!< Text coding
int recursive_trace; //!< Subgraph recursive trace int recursive_trace; //!< Subgraph recursive trace
glow_eEditSetMode edit_set_mode; //!< Special edit mode glow_eEditSetMode edit_set_mode; //!< Special edit mode
void reset_dirty();
}; };
void grow_auto_scrolling(GrowCtx* ctx); void grow_auto_scrolling(GrowCtx* ctx);
......
...@@ -314,6 +314,7 @@ public: ...@@ -314,6 +314,7 @@ public:
glow_eDirection* direction); glow_eDirection* direction);
void set_input_focus(int focus, glow_eEvent event); void set_input_focus(int focus, glow_eEvent event);
int set_source(char* source, char* new_owner); int set_source(char* source, char* new_owner);
void reset_dirty() {window_ctx->reset_dirty();}
static void v_value_changed_cb(void* o, double value); static void v_value_changed_cb(void* o, double value);
static void h_value_changed_cb(void* o, double value); static void h_value_changed_cb(void* o, double value);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment