Remove debug code from release mode
This commit is contained in:
parent
784edaccd2
commit
22ce7c5427
4 changed files with 39 additions and 30 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,11 +1,13 @@
|
||||||
2019-06-02 master
|
2019-07-12 master
|
||||||
- Expand leading ~ in icon paths
|
- Fixes:
|
||||||
- Fix spacing around icons in executor without text in vertical panels (issue #716)
|
- Fix spacing around icons in executor without text in vertical panels (issue #716)
|
||||||
- Fix Bug: Clock Only Updates Every Minute With Format %s (issue #724)
|
- Fix Bug: Clock Only Updates Every Minute With Format %s (issue #724)
|
||||||
- Fix markup drawing when font shadow enabled (issue #709)
|
- Fix markup drawing when font shadow enabled (issue #709)
|
||||||
- Blink battery when low (issue #723)
|
- Struts pivoting: workaround for panel positioning between monitors in mutter (Chris Billington)
|
||||||
- Struts pivoting: workaround for panel positioning between monitors in mutter
|
- Enhancements:
|
||||||
|
- Blink battery when discharging and low (issue #723)
|
||||||
- Add support for battery percentage without % sign (issue #730)
|
- Add support for battery percentage without % sign (issue #730)
|
||||||
|
- Expand leading ~ in icon paths
|
||||||
|
|
||||||
2018-08-05 16.6.1
|
2018-08-05 16.6.1
|
||||||
- Fix packaging regression for debian (issue #715)
|
- Fix packaging regression for debian (issue #715)
|
||||||
|
|
3
packaging/configure
vendored
3
packaging/configure
vendored
|
@ -420,7 +420,8 @@ if args.asan or args.memory_tracing or args.tracing:
|
||||||
trace_flags = ['-O0',
|
trace_flags = ['-O0',
|
||||||
'-fno-common',
|
'-fno-common',
|
||||||
'-fno-omit-frame-pointer',
|
'-fno-omit-frame-pointer',
|
||||||
'-rdynamic']
|
'-rdynamic',
|
||||||
|
'-DUSE_REAL_MALLOC']
|
||||||
CFLAGS += trace_flags
|
CFLAGS += trace_flags
|
||||||
LFLAGS += trace_flags + ['-fuse-ld=gold']
|
LFLAGS += trace_flags + ['-fuse-ld=gold']
|
||||||
|
|
||||||
|
|
|
@ -797,6 +797,7 @@ void tint2(int argc, char **argv, gboolean *restart)
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
|
#ifdef USE_REAL_MALLOC
|
||||||
if (!getenv("G_SLICE") && setenv("G_SLICE", "always-malloc", 1) == 0) {
|
if (!getenv("G_SLICE") && setenv("G_SLICE", "always-malloc", 1) == 0) {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
YELLOW "tint2: reexecuting tint2 without glib slice allocator..." RESET "\n");
|
YELLOW "tint2: reexecuting tint2 without glib slice allocator..." RESET "\n");
|
||||||
|
@ -804,6 +805,11 @@ int main(int argc, char **argv)
|
||||||
fprintf(stderr, RED "tint2: %s %d: execvp failed! carrying on..." RESET "\n",
|
fprintf(stderr, RED "tint2: %s %d: execvp failed! carrying on..." RESET "\n",
|
||||||
__FILE__, __LINE__);
|
__FILE__, __LINE__);
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
fprintf(stderr, "tint2: Using glib slice allocator (default). "
|
||||||
|
"Run tint2 with environment variable G_SLICE=always-malloc "
|
||||||
|
"in case of strange behavior or crashes\n");
|
||||||
|
#endif
|
||||||
gboolean restart;
|
gboolean restart;
|
||||||
do {
|
do {
|
||||||
restart = FALSE;
|
restart = FALSE;
|
||||||
|
|
|
@ -371,7 +371,7 @@ void smooth_thumbnail(cairo_surface_t *image_surface)
|
||||||
const size_t rmask = 0xff0000;
|
const size_t rmask = 0xff0000;
|
||||||
const size_t gmask = 0xff00;
|
const size_t gmask = 0xff00;
|
||||||
const size_t bmask = 0xff;
|
const size_t bmask = 0xff;
|
||||||
for (size_t i = 0; i < tw * (th - 1) - 1; i++) {
|
for (size_t i = 0; i < tw * (th - 1) - 1 && i < tw * th; i++) {
|
||||||
u_int32_t c1 = data[i];
|
u_int32_t c1 = data[i];
|
||||||
u_int32_t c2 = data[i + 1];
|
u_int32_t c2 = data[i + 1];
|
||||||
u_int32_t c3 = data[i + tw];
|
u_int32_t c3 = data[i + tw];
|
||||||
|
@ -379,7 +379,6 @@ void smooth_thumbnail(cairo_surface_t *image_surface)
|
||||||
u_int32_t b = (5 * (c1 & bmask) + 1 * (c2 & bmask) + 1 * (c3 & bmask) + 1 * (c4 & bmask)) / 8;
|
u_int32_t b = (5 * (c1 & bmask) + 1 * (c2 & bmask) + 1 * (c3 & bmask) + 1 * (c4 & bmask)) / 8;
|
||||||
u_int32_t g = (5 * (c1 & gmask) + 1 * (c2 & gmask) + 1 * (c3 & gmask) + 1 * (c4 & gmask)) / 8;
|
u_int32_t g = (5 * (c1 & gmask) + 1 * (c2 & gmask) + 1 * (c3 & gmask) + 1 * (c4 & gmask)) / 8;
|
||||||
u_int32_t r = (5 * (c1 & rmask) + 1 * (c2 & rmask) + 1 * (c3 & rmask) + 1 * (c4 & rmask)) / 8;
|
u_int32_t r = (5 * (c1 & rmask) + 1 * (c2 & rmask) + 1 * (c3 & rmask) + 1 * (c4 & rmask)) / 8;
|
||||||
g_assert(i < tw * th);
|
|
||||||
data[i] = (r & rmask) | (g & gmask) | (b & bmask);
|
data[i] = (r & rmask) | (g & gmask) | (b & bmask);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -537,6 +536,7 @@ cairo_surface_t *get_window_thumbnail_ximage(Window win, size_t size, gboolean u
|
||||||
for (size_t yt = 0, y = 0; yt < th; yt++, y += ystep) {
|
for (size_t yt = 0, y = 0; yt < th; yt++, y += ystep) {
|
||||||
for (size_t xt = 0, x = 0; xt < fw; xt++, x += xstep) {
|
for (size_t xt = 0, x = 0; xt < fw; xt++, x += xstep) {
|
||||||
size_t j = yt * tw + ox + xt;
|
size_t j = yt * tw + ox + xt;
|
||||||
|
if (j < tw * th) {
|
||||||
u_int32_t c1 = (u_int32_t)GetPixel(ximg, (int)((x + offset_x1) / prec), (int)((y + offset_y1) / prec));
|
u_int32_t c1 = (u_int32_t)GetPixel(ximg, (int)((x + offset_x1) / prec), (int)((y + offset_y1) / prec));
|
||||||
u_int32_t c2 = (u_int32_t)GetPixel(ximg, (int)((x + offset_x2) / prec), (int)((y + offset_y2) / prec));
|
u_int32_t c2 = (u_int32_t)GetPixel(ximg, (int)((x + offset_x2) / prec), (int)((y + offset_y2) / prec));
|
||||||
u_int32_t c3 = (u_int32_t)GetPixel(ximg, (int)((x + offset_x3) / prec), (int)((y + offset_y3) / prec));
|
u_int32_t c3 = (u_int32_t)GetPixel(ximg, (int)((x + offset_x3) / prec), (int)((y + offset_y3) / prec));
|
||||||
|
@ -553,10 +553,10 @@ cairo_surface_t *get_window_thumbnail_ximage(Window win, size_t size, gboolean u
|
||||||
u_int32_t r = ((c1 & rmask) + (c2 & rmask) + (c3 & rmask) + (c4 & rmask) + (c5 & rmask) * 2 + (c6 & rmask) +
|
u_int32_t r = ((c1 & rmask) + (c2 & rmask) + (c3 & rmask) + (c4 & rmask) + (c5 & rmask) * 2 + (c6 & rmask) +
|
||||||
(c7 & rmask)) /
|
(c7 & rmask)) /
|
||||||
8;
|
8;
|
||||||
g_assert(j < tw * th);
|
|
||||||
data[j] = (r & rmask) | (g & gmask) | (b & bmask);
|
data[j] = (r & rmask) | (g & gmask) | (b & bmask);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// Convert to argb32
|
// Convert to argb32
|
||||||
if (rmask & 0xff0000) {
|
if (rmask & 0xff0000) {
|
||||||
// argb32 or rgb24 => Nothing to do
|
// argb32 or rgb24 => Nothing to do
|
||||||
|
@ -614,7 +614,7 @@ gboolean cairo_surface_is_blank(cairo_surface_t *image_surface)
|
||||||
return empty;
|
return empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean thumb_use_shm;
|
gboolean thumb_use_shm = FALSE;
|
||||||
|
|
||||||
cairo_surface_t *get_window_thumbnail(Window win, int size)
|
cairo_surface_t *get_window_thumbnail(Window win, int size)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue