Enlightenment CVS committal
Author : lordchaos
Project : e17
Module : proto
Dir : e17/proto/entropy/src/plugins
Modified Files:
layout_ewl_simple.c
Log Message:
* Proper layout window reference counting - entropy now exits on the close of
the last layout window
===================================================================
RCS file:
/cvsroot/enlightenment/e17/proto/entropy/src/plugins/layout_ewl_simple.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -3 -r1.40 -r1.41
--- layout_ewl_simple.c 1 Feb 2006 08:06:02 -0000 1.40
+++ layout_ewl_simple.c 4 Feb 2006 01:06:39 -0000 1.41
@@ -12,7 +12,7 @@
#define HEADER_CONFIG_MAX 2048
static Ewl_Widget *win;
-static ewl_layout_count = 0;
+static int _ewl_layout_count = 0;
int entropy_plugin_type_get ();
char *entropy_plugin_identify ();
@@ -627,11 +627,13 @@
{
entropy_core *core = (entropy_core *) user_data;
ewl_widget_destroy (main_win);
+ _ewl_layout_count--;
-
- entropy_core_destroy (core);
-
- exit (0);
+ if (_ewl_layout_count == 0) {
+ entropy_core_destroy (core);
+ /*TODO cleanup this layout's structure to avoid leaks*/
+ exit (0);
+ }
}
void
@@ -775,6 +777,8 @@
entropy_layout_gui *gui;
char *tmp = NULL;
+ _ewl_layout_count++;
+
/*EWL Stuff ----------------- */
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs