all repos — tint2 @ 15d2570a3e1d39015e38a7b1bcad2c215b28dcc3

fork of the tint2 desktop panel for my custom setup - only minimized windows across all desktops for the taskbar

Silence warnings
Chris Lee @klee93
commit

15d2570a3e1d39015e38a7b1bcad2c215b28dcc3

parent

c76f0567469abd7bac9f3e6bb55b1784e75e3480

M packaging/configurepackaging/configure

@@ -510,7 +510,8 @@ tint2conf.cflags += ['-DTINT2CONF',

'-DINSTALL_PREFIX=\\"{}\\"'.format(prefix), '-DLOCALEDIR=\\"{}\\"'.format(localedir), '-DGETTEXT_PACKAGE=\\"tint2conf\\"', - '-DHAVE_VERSION_H'] + '-DHAVE_VERSION_H', + '-Wno-shadow'] tint2conf.sources = ['src/util/bt.c', 'src/util/common.c',
M src/init.csrc/init.c

@@ -209,8 +209,8 @@ fprintf(stderr, "tint2: could not open display!\n");

exit(EXIT_FAILURE); } server.x11_fd = ConnectionNumber(server.display); - XSetErrorHandler((XErrorHandler)server_catch_error); - XSetIOErrorHandler((XIOErrorHandler)x11_io_error); + XSetErrorHandler(server_catch_error); + XSetIOErrorHandler(x11_io_error); server_init_atoms(); server.screen = DefaultScreen(server.display); server.root_win = RootWindow(server.display, server.screen);
M src/launcher/launcher.csrc/launcher/launcher.c

@@ -399,7 +399,12 @@

Imlib_Image scale_icon(Imlib_Image original, int icon_size) { Imlib_Image icon_scaled; - if (original) { + if (!icon_size) { + icon_scaled = imlib_create_image(1, 1); + imlib_context_set_image(icon_scaled); + imlib_context_set_color(255, 255, 255, 255); + imlib_image_fill_rectangle(0, 0, icon_size, icon_size); + } else if (original) { imlib_context_set_image(original); icon_scaled = imlib_create_cropped_scaled_image(0, 0,
M src/tint2conf/main.csrc/tint2conf/main.c

@@ -383,6 +383,11 @@ }

// ====== Theme import/copy/delete ====== +static void free_data(gpointer data, gpointer userdata) +{ + g_free(data); +} + // Shows open dialog and copies the selected files to ~ without overwrite. static void menuImportFile() {

@@ -407,7 +412,7 @@ for (GSList *l = list; l; l = l->next) {

gchar *newpath = import_no_overwrite(l->data); g_free(newpath); } - g_slist_foreach(list, (GFunc)g_free, NULL); + g_slist_foreach(list, free_data, NULL); g_slist_free(list); gtk_widget_destroy(dialog); }
M src/util/common.csrc/util/common.c

@@ -362,8 +362,12 @@ #endif // HAVE_SN

// Allow children to exist after parent destruction setsid(); // Run the command - if (dir) - chdir(dir); + if (dir) { + int ret = chdir(dir); + if (ret != 0) { + fprintf(stderr, "tint2: failed to chdir to %s\n", dir); + } + } close_all_fds(); reset_signals(); if (terminal) {
M src/util/server.csrc/util/server.c

@@ -36,8 +36,9 @@ #include "window.h"

Server server; -void server_catch_error(Display *d, XErrorEvent *ev) +int server_catch_error(Display *d, XErrorEvent *ev) { + return 0; } void server_init_atoms()

@@ -676,9 +677,10 @@ close(log_fd);

#endif } -void x11_io_error(Display *display) +int x11_io_error(Display *display) { handle_crash("X11 I/O error"); + return 0; } #ifdef HAVE_SN
M src/util/server.hsrc/util/server.h

@@ -164,12 +164,12 @@ void send_event32(Window win, Atom at, long data1, long data2, long data3);

int get_property32(Window win, Atom at, Atom type); void *server_get_property(Window win, Atom at, Atom type, int *num_results); Atom server_get_atom(char *atom_name); -void server_catch_error(Display *d, XErrorEvent *ev); +int server_catch_error(Display *d, XErrorEvent *ev); void server_init_atoms(); void server_init_visual(); void server_init_xdamage(); -void x11_io_error(Display *display); +int x11_io_error(Display *display); void handle_crash(const char *reason); // detect root background