<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -15,6 +15,7 @@ help() {
 	echo -e &quot;  --ugly             enable ugly verbose mode&quot;
 	echo -e &quot;  --with-ev          implement event loop with libev&quot;
 	echo -e &quot;  --with-event       implement event loop with libevent&quot;
+	echo -e &quot;  --with-composite   enable compositing mode (EXPERIMENTAL)&quot;
 }
 
 TIMERFDMSG=&quot;\n***************************************************************************\nWARNING! Probably you have an old glibc library and/or an old linux kernel,\nyou need glibc &gt;= 2.8 and the linux kernel &gt;= 2.6.22 to compile this panel.\n***************************************************************************\n&quot;
@@ -126,6 +127,7 @@ OPTIMIZE=0
 UGLY=0
 WITH_EV=0
 WITH_EVENT=0
+WITH_COMPOSITE=0
 
 while [ $# -gt 0 ]; do
 	case $1 in
@@ -154,6 +156,9 @@ while [ $# -gt 0 ]; do
 		--with-event)
 			WITH_EVENT=1
 			;;
+		--with-composite)
+			WITH_COMPOSITE=1
+			;;
 		*)
 			echo &quot;unknown option $1&quot;
 			help
@@ -176,8 +181,13 @@ else
 fi
 check_pkg_version imlib2 1.4.0
 check_pkg x11
-check_pkg xrender
-check_pkg xcomposite
+
+if [ $WITH_COMPOSITE -eq 1 ]; then
+	check_pkg xrender
+	check_pkg xcomposite
+	CFLAGS=&quot;$CFLAGS -DWITH_COMPOSITE&quot;
+fi
+
 check_pkg fontconfig
 append_libs_and_cflags
 
@@ -185,6 +195,7 @@ if [ $MEMDEBUG -eq 1 ]; then
 	CFLAGS=&quot;$CFLAGS -DMEMDEBUG&quot;
 fi
 
+
 if [ $WITH_EV -eq 1 ]; then
 	CFLAGS=&quot;$CFLAGS -DWITH_EV&quot;
 	LIBS=&quot;$LIBS -lev&quot;</diff>
      <filename>configure</filename>
    </modified>
    <modified>
      <diff>@@ -13,7 +13,13 @@
 #include &lt;fcntl.h&gt;
 #include &lt;dirent.h&gt;
 #include &lt;X11/Xutil.h&gt;
-#include &lt;X11/extensions/Xcomposite.h&gt;
+
+/* composite */
+#if defined(WITH_COMPOSITE)
+ #include &lt;X11/extensions/Xcomposite.h&gt;
+#endif
+
+/* event loop */
 #if defined(WITH_EV)
  #include &lt;ev.h&gt;
 #elif defined(WITH_EVENT)
@@ -21,6 +27,7 @@
 #else
  #include &lt;sys/timerfd.h&gt;
 #endif
+
 #include &quot;logger.h&quot;
 #include &quot;theme.h&quot;
 #include &quot;render.h&quot;
@@ -324,6 +331,7 @@ static char *alloc_window_name(Window win)
   creating panel window
 **************************************************************************/
 
+#ifdef WITH_COMPOSITE
 static Visual *find_argb_visual()
 {
 	XVisualInfo *xvi;
@@ -387,6 +395,7 @@ static void setup_composite()
 	X.amask = CWBackPixel | CWColormap | CWOverrideRedirect | CWBorderPixel;
 	X.depth = 32;
 }
+#endif
 
 static Window create_panel_window(uint placement, int alignment, int h, int w, int hover)
 {
@@ -1229,8 +1238,10 @@ validation:
 		LOG_ERROR(&quot;invalid theme: %s&quot;, theme);
 
 	/* setup composite if necessary */
+#ifdef WITH_COMPOSITE
 	if (P.theme-&gt;use_composite)
 		setup_composite();
+#endif
 
 	/* create panel window */
 	P.width = X.wa_w;
@@ -1244,6 +1255,7 @@ validation:
 				    P.width,
 				    P.theme-&gt;height_override);
 
+#ifdef WITH_COMPOSITE
 	if (P.theme-&gt;use_composite)
 		XCompositeRedirectSubwindows(X.display, P.win, CompositeRedirectAutomatic);
 
@@ -1251,6 +1263,7 @@ validation:
 		LOG_WARNING(&quot;tray cannot be used with composite mode enabled&quot;);
 		theme_remove_element(P.theme, 't');
 	}
+#endif
 
 	/* init tray if needed */
 	if (is_element_in_theme(P.theme, 't'))</diff>
      <filename>src/bmpanel.c</filename>
    </modified>
    <modified>
      <diff>@@ -7,7 +7,12 @@
 
 #include &lt;X11/Xlib.h&gt;
 #include &lt;X11/Xatom.h&gt;
-#include &lt;X11/extensions/Xrender.h&gt;
+
+/* composite */
+#if defined(WITH_COMPOSITE)
+ #include &lt;X11/extensions/Xrender.h&gt;
+#endif
+
 #include &lt;Imlib2.h&gt;
 #include &quot;common.h&quot;
 </diff>
      <filename>src/bmpanel.h</filename>
    </modified>
    <modified>
      <diff>@@ -25,15 +25,17 @@ static Imlib_Image bg;
 static Pixmap *rootpmap;
 static Pixmap currootpmap;
 
-/* composite */
 static Imlib_Image bbcolor;
+
+/* composite */
+#ifdef WITH_COMPOSITE
 static Imlib_Image bbalpha;
 static Pixmap pixcolor;
 static Pixmap pixalpha;
 static Picture piccolor;
 static Picture picalpha;
-
 static Picture rootpic;
+#endif
 
 static Display *bbdpy;
 static Visual *bbvis;
@@ -624,6 +626,7 @@ void init_render(struct xinfo *X, struct panel *P)
 	imlib_context_set_visual(bbvis);
 	imlib_context_set_colormap(bbcm);
 
+#ifdef WITH_COMPOSITE
 	if (P-&gt;theme-&gt;use_composite) {
 		XRenderPictFormat *fmt = XRenderFindStandardFormat(bbdpy, PictStandardARGB32);
 		bbalpha = imlib_create_image(bbwidth, bbheight);
@@ -638,7 +641,9 @@ void init_render(struct xinfo *X, struct panel *P)
 		pwin.subwindow_mode = IncludeInferiors;
 		rootpic = XRenderCreatePicture(bbdpy, bbwin, XRenderFindVisualFormat(bbdpy, bbvis), 
 				CPSubwindowMode, &amp;pwin);
-	} else if (*rootpmap) {
+	} else 
+#endif
+	if (*rootpmap) {
 		update_bg();
 	} else {
 		set_bg();
@@ -655,6 +660,7 @@ void shutdown_render()
 	imlib_context_set_image(bbcolor);
 	imlib_free_image();
 
+#ifdef WITH_COMPOSITE
 	if (theme-&gt;use_composite) {
 		imlib_context_set_image(bbalpha);
 		imlib_free_image();
@@ -664,7 +670,9 @@ void shutdown_render()
 		XRenderFreePicture(bbdpy, picalpha);
 		XFreePixmap(bbdpy, pixcolor);
 		XFreePixmap(bbdpy, pixalpha);
-	} else if (bg) {
+	} else 
+#endif
+	if (bg) {
 		imlib_context_set_image(bg);
 		imlib_free_image();
 	}
@@ -780,6 +788,7 @@ void render_panel(struct panel *p)
 void render_present()
 {
 	update_bg();
+#ifdef WITH_COMPOSITE
 	if (theme-&gt;use_composite) {
 		/* 
 		 * Because XRender can't do directly SRCc * SRCa + DSTc * (1 - SRCa) blending,
@@ -814,7 +823,9 @@ void render_present()
 				 rootpic,
 				 0, 0, 0, 0, 0, 0, bbwidth, 
 				 bbheight);
-	} else if (*rootpmap) {
+	} else 
+#endif
+	if (*rootpmap) {
 		imlib_context_set_image(bbcolor);
 		imlib_blend_image_onto_image(bg,0,0,0,bbwidth,bbheight,0,0,bbwidth,bbheight);
 		imlib_context_set_blend(1);</diff>
      <filename>src/render.c</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>04aecde13ebbdb5f3d896c6d723201a55d566585</id>
    </parent>
  </parents>
  <author>
    <name>nsf</name>
    <email>no.smile.face@gmail.com</email>
  </author>
  <url>http://github.com/nsf/bmpanel/commit/65542fa5afb8ab224a3a8c60a15bc2d830220879</url>
  <id>65542fa5afb8ab224a3a8c60a15bc2d830220879</id>
  <committed-date>2008-10-24T01:42:54-07:00</committed-date>
  <authored-date>2008-10-24T01:42:54-07:00</authored-date>
  <message>Make composite non-default experimental feature.

./configure --with-composite - to enable compositing features.

Let's face it. The reasons are:
 - Tray doesn't work with composite mode.
 - Composite does true transparency, but xshape isn't here, so, this
   feature is useless. A good screenshot for making impressions on
   your friends can't be a reason.
 - Composite requires compositing manager.

And personally I think that it's not the age of compositing yet.
Maybe it's about eye-candy. But after rethink of my philosophy for
bmpanel, it's definitely about usability and KISS.

Panel should be pretty enough and usable enough. Running on bleeding
edge was my mistake. Also I have to say, that compositing probably
will be removed in future versions.</message>
  <tree>9d39fed9fe23df68c3ace0b3ce15016d94ea4ef1</tree>
  <committer>
    <name>nsf</name>
    <email>no.smile.face@gmail.com</email>
  </committer>
</commit>
