Commit c7a81655 authored by o9000's avatar o9000

Merge branch 'warning' into 'master'

Fix warning ISO C does not support __FUNCTION__

See merge request !28
parents 3320ee8e 9aa50104
......@@ -104,7 +104,7 @@ void handle_event_property_notify(XEvent *e)
// Change name of desktops
else if (at == server.atom._NET_DESKTOP_NAMES) {
if (debug)
fprintf(stderr, "tint2: %s %d: win = root, atom = _NET_DESKTOP_NAMES\n", __FUNCTION__, __LINE__);
fprintf(stderr, "tint2: %s %d: win = root, atom = _NET_DESKTOP_NAMES\n", __func__, __LINE__);
update_desktop_names();
}
// Change desktops
......@@ -112,7 +112,7 @@ void handle_event_property_notify(XEvent *e)
at == server.atom._NET_DESKTOP_VIEWPORT || at == server.atom._NET_WORKAREA ||
at == server.atom._NET_CURRENT_DESKTOP) {
if (debug)
fprintf(stderr, "tint2: %s %d: win = root, atom = ?? desktops changed\n", __FUNCTION__, __LINE__);
fprintf(stderr, "tint2: %s %d: win = root, atom = ?? desktops changed\n", __func__, __LINE__);
if (!taskbar_enabled)
return;
int old_num_desktops = server.num_desktops;
......@@ -202,7 +202,7 @@ void handle_event_property_notify(XEvent *e)
// Window list
else if (at == server.atom._NET_CLIENT_LIST) {
if (debug)
fprintf(stderr, "tint2: %s %d: win = root, atom = _NET_CLIENT_LIST\n", __FUNCTION__, __LINE__);
fprintf(stderr, "tint2: %s %d: win = root, atom = _NET_CLIENT_LIST\n", __func__, __LINE__);
taskbar_refresh_tasklist();
update_all_taskbars_visibility();
schedule_panel_redraw();
......@@ -210,12 +210,12 @@ void handle_event_property_notify(XEvent *e)
// Change active
else if (at == server.atom._NET_ACTIVE_WINDOW) {
if (debug)
fprintf(stderr, "tint2: %s %d: win = root, atom = _NET_ACTIVE_WINDOW\n", __FUNCTION__, __LINE__);
fprintf(stderr, "tint2: %s %d: win = root, atom = _NET_ACTIVE_WINDOW\n", __func__, __LINE__);
reset_active_task();
schedule_panel_redraw();
} else if (at == server.atom._XROOTPMAP_ID || at == server.atom._XROOTMAP_ID) {
if (debug)
fprintf(stderr, "tint2: %s %d: win = root, atom = _XROOTPMAP_ID\n", __FUNCTION__, __LINE__);
fprintf(stderr, "tint2: %s %d: win = root, atom = _XROOTPMAP_ID\n", __func__, __LINE__);
// change Wallpaper
for (int i = 0; i < num_panels; i++) {
set_panel_background(&panels[i]);
......@@ -234,7 +234,7 @@ void handle_event_property_notify(XEvent *e)
char *atom_name = XGetAtomName(server.display, at);
fprintf(stderr,
"%s %d: win = %ld, task = %s, atom = %s\n",
__FUNCTION__,
__func__,
__LINE__,
win,
task ? (task->title ? task->title : "??") : "null",
......@@ -243,7 +243,7 @@ void handle_event_property_notify(XEvent *e)
}
if (!task) {
if (debug)
fprintf(stderr, "tint2: %s %d\n", __FUNCTION__, __LINE__);
fprintf(stderr, "tint2: %s %d\n", __func__, __LINE__);
if (at == server.atom._NET_WM_STATE) {
// xfce4 sends _NET_WM_STATE after minimized to tray, so we need to check if window is mapped
// if it is mapped and not set as skip_taskbar, we must add it to our task list
......@@ -277,7 +277,7 @@ void handle_event_property_notify(XEvent *e)
Atom *atom_state = server_get_property(win, server.atom._NET_WM_STATE, XA_ATOM, &count);
for (int j = 0; j < count; j++) {
char *atom_state_name = XGetAtomName(server.display, atom_state[j]);
fprintf(stderr, "tint2: %s %d: _NET_WM_STATE = %s\n", __FUNCTION__, __LINE__, atom_state_name);
fprintf(stderr, "tint2: %s %d: _NET_WM_STATE = %s\n", __func__, __LINE__, atom_state_name);
XFree(atom_state_name);
}
XFree(atom_state);
......
......@@ -165,7 +165,7 @@ gboolean resize_panel(void *obj);
void render_panel(Panel *panel);
void shrink_panel(Panel *panel);
void _schedule_panel_redraw(const char *file, const char *function, const int line);
#define schedule_panel_redraw() _schedule_panel_redraw(__FILE__, __FUNCTION__, __LINE__)
#define schedule_panel_redraw() _schedule_panel_redraw(__FILE__, __func__, __LINE__)
void set_panel_items_order(Panel *p);
void place_panel_all_desktops(Panel *p);
......
This diff is collapsed.
......@@ -93,7 +93,7 @@ Task *add_task(Window win)
(int)win,
task_template.title ? task_template.title : "null");
// fprintf(stderr, "tint2: %s %d: win = %ld, task = %s\n", __FUNCTION__, __LINE__, win, task_template.title ?
// fprintf(stderr, "tint2: %s %d: win = %ld, task = %s\n", __func__, __LINE__, win, task_template.title ?
// task_template.title : "??");
// fprintf(stderr, "tint2: new task %s win %u: desktop %d, monitor %d\n", new_task.title, win, new_task.desktop, monitor);
......@@ -118,7 +118,7 @@ Task *add_task(Window win)
task_instance->win_h = task_template.win_h;
task_instance->current_state = TASK_UNDEFINED; // to update the current state later in set_task_state...
if (task_instance->desktop == ALL_DESKTOPS && server.desktop != j) {
// fprintf(stderr, "tint2: %s %d: win = %ld hiding task: another desktop\n", __FUNCTION__, __LINE__, win);
// fprintf(stderr, "tint2: %s %d: win = %ld hiding task: another desktop\n", __func__, __LINE__, win);
task_instance->area.on_screen = always_show_all_desktop_tasks;
}
task_instance->title = task_template.title;
......@@ -186,7 +186,7 @@ void remove_task(Task *task)
if (!task)
return;
// fprintf(stderr, "tint2: %s %d: win = %ld, task = %s\n", __FUNCTION__, __LINE__, task->win, task->title ? task->title :
// fprintf(stderr, "tint2: %s %d: win = %ld, task = %s\n", __func__, __LINE__, task->win, task->title ? task->title :
// "??");
if (taskbar_mode == MULTI_DESKTOP) {
......@@ -292,7 +292,7 @@ void task_update_icon(Task *task)
if (0 && img)
fprintf(stderr,
"%s: Got %dx%d icon via _NET_WM_ICON for %s\n",
__FUNCTION__,
__func__,
w,
h,
task->title ? task->title : "task");
......@@ -318,7 +318,7 @@ void task_update_icon(Task *task)
if (0 && img)
fprintf(stderr,
"%s: Got %dx%d pixmap icon via WM_HINTS for %s\n",
__FUNCTION__,
__func__,
w,
h,
task->title ? task->title : "task");
......@@ -783,7 +783,7 @@ void task_handle_mouse_event(Task *task, MouseAction action)
void task_update_desktop(Task *task)
{
// fprintf(stderr, "tint2: %s %d:\n", __FUNCTION__, __LINE__);
// fprintf(stderr, "tint2: %s %d:\n", __func__, __LINE__);
Window win = task->win;
remove_task(task);
task = add_task(win);
......
......@@ -467,7 +467,7 @@ void taskbar_refresh_tasklist()
{
if (!taskbar_enabled)
return;
// fprintf(stderr, "tint2: %s %d:\n", __FUNCTION__, __LINE__);
// fprintf(stderr, "tint2: %s %d:\n", __func__, __LINE__);
int num_results;
Window *win = server_get_property(server.root_win, server.atom._NET_CLIENT_LIST, XA_WINDOW, &num_results);
......
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