Imlib_Image default_icon;
-
-void autohide_hide(void* p);
-void autohide_show(void* p);
-
-
void default_panel()
{
panel1 = 0;
Area* click_area(Panel *panel, int x, int y);
void autohide_show(void* p);
+void autohide_hide(void* p);
void autohide_trigger_show(Panel* p);
void autohide_trigger_hide(Panel* p);
server.atom.XdndAware = XInternAtom(server.dsp, "XdndAware", False);
server.atom.XdndPosition = XInternAtom(server.dsp, "XdndPosition", False);
server.atom.XdndStatus = XInternAtom(server.dsp, "XdndStatus", False);
+ server.atom.XdndLeave = XInternAtom(server.dsp, "XdndLeave", False);
}
Atom XdndAware;
Atom XdndPosition;
Atom XdndStatus;
+ Atom XdndLeave;
} Global_atom;
Panel *panel;
GSList *it;
struct timeval* timeout;
+ int hidden_dnd = 0;
start:
init (argc, argv);
else if (e.type == LeaveNotify)
autohide_trigger_hide(panel);
if (panel->is_hidden) {
- if (e.type == ClientMessage && e.xclient.message_type == server.atom.XdndPosition)
+ 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);
+ }
}
switch (e.type) {