sigaction(SIGUSR1, &sa, 0);
sigaction(SIGINT, &sa, 0);
sigaction(SIGTERM, &sa, 0);
sigaction(SIGHUP, &sa, 0);
sigaction(SIGUSR1, &sa, 0);
sigaction(SIGINT, &sa, 0);
sigaction(SIGTERM, &sa, 0);
sigaction(SIGHUP, &sa, 0);
- // BSD is too stupid to support pselect(), therefore we have to use select and hope that we do not
- // end up in a race condition there
+ // BSD does not support pselect(), therefore we have to use select and hope that we do not
+ // end up in a race condition there (see 'man select()' on a linux machine for more information)
// block all signals, such that no race conditions occur before pselect in our main loop
// sigset_t block_mask;
// sigaddset(&block_mask, SIGINT);
// block all signals, such that no race conditions occur before pselect in our main loop
// sigset_t block_mask;
// sigaddset(&block_mask, SIGINT);
panel->area.width = server.monitor[0].width;
panel->temp_pmap = XCreatePixmap(server.dsp, server.root_win, panel->area.width, panel->area.height, server.depth);
panel->area.width = server.monitor[0].width;
panel->temp_pmap = XCreatePixmap(server.dsp, server.root_win, panel->area.width, panel->area.height, server.depth);
Taskbar *tskbar = click_taskbar(panel, e->x, e->y);
if (tskbar && e->button == 1 && panel_mode == MULTI_DESKTOP)
return 1;
Taskbar *tskbar = click_taskbar(panel, e->x, e->y);
if (tskbar && e->button == 1 && panel_mode == MULTI_DESKTOP)
return 1;
Taskbar *tskbar;
if ( !(tskbar = click_taskbar(panel, e->xbutton.x, e->xbutton.y)) ) {
// TODO: check better solution to keep window below
Taskbar *tskbar;
if ( !(tskbar = click_taskbar(panel, e->xbutton.x, e->xbutton.y)) ) {
// TODO: check better solution to keep window below
else {
if (panel->temp_pmap) XFreePixmap(server.dsp, panel->temp_pmap);
panel->temp_pmap = XCreatePixmap(server.dsp, server.root_win, panel->area.width, panel->area.height, server.depth);
else {
if (panel->temp_pmap) XFreePixmap(server.dsp, panel->temp_pmap);
panel->temp_pmap = XCreatePixmap(server.dsp, server.root_win, panel->area.width, panel->area.height, server.depth);
XCopyArea(server.dsp, panel->temp_pmap, panel->main_win, server.gc, 0, 0, panel->area.width, panel->area.height, 0, 0);
}
}
XCopyArea(server.dsp, panel->temp_pmap, panel->main_win, server.gc, 0, 0, panel->area.width, panel->area.height, 0, 0);
}
}
autohide_trigger_show(panel);
else if (e.type == LeaveNotify)
autohide_trigger_hide(panel);
autohide_trigger_show(panel);
else if (e.type == LeaveNotify)
autohide_trigger_hide(panel);
- if (panel->is_hidden)
- continue; // discard further processing of this event because the panel is not visible yet
+ if (panel->is_hidden) {
+ if (e.type == ClientMessage && e.xclient.message_type == server.atom.XdndPosition) {
+ hidden_dnd = 1;
+ autohide_show(panel);
+ }
+ else
+ continue; // discard further processing of this event because the panel is not visible yet
+ }
+ else if (hidden_dnd && e.type == ClientMessage && e.xclient.message_type == server.atom.XdndLeave) {
+ hidden_dnd = 0;
+ autohide_hide(panel);
+ }
Panel* panel = get_panel(e.xmotion.window);
Area* area = click_area(panel, e.xmotion.x, e.xmotion.y);
if (area->_get_tooltip_text)
Panel* panel = get_panel(e.xmotion.window);
Area* area = click_area(panel, e.xmotion.x, e.xmotion.y);
if (area->_get_tooltip_text)
- tooltip_trigger_show(area, panel, e.xmotion.x_root, e.xmotion.y_root);
+ tooltip_trigger_show(area, panel, &e);