*fix* finish dnd problems and autohide
git-svn-id: http://tint2.googlecode.com/svn/trunk@514 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
This commit is contained in:
parent
72cdc49512
commit
357e37282a
5 changed files with 11 additions and 6 deletions
|
@ -71,11 +71,6 @@ GArray* backgrounds;
|
||||||
|
|
||||||
Imlib_Image default_icon;
|
Imlib_Image default_icon;
|
||||||
|
|
||||||
|
|
||||||
void autohide_hide(void* p);
|
|
||||||
void autohide_show(void* p);
|
|
||||||
|
|
||||||
|
|
||||||
void default_panel()
|
void default_panel()
|
||||||
{
|
{
|
||||||
panel1 = 0;
|
panel1 = 0;
|
||||||
|
|
|
@ -149,6 +149,7 @@ int click_clock(Panel *panel, int x, int y);
|
||||||
Area* click_area(Panel *panel, int x, int y);
|
Area* click_area(Panel *panel, int x, int y);
|
||||||
|
|
||||||
void autohide_show(void* p);
|
void autohide_show(void* p);
|
||||||
|
void autohide_hide(void* p);
|
||||||
void autohide_trigger_show(Panel* p);
|
void autohide_trigger_show(Panel* p);
|
||||||
void autohide_trigger_hide(Panel* p);
|
void autohide_trigger_hide(Panel* p);
|
||||||
|
|
||||||
|
|
|
@ -95,6 +95,7 @@ void server_init_atoms ()
|
||||||
server.atom.XdndAware = XInternAtom(server.dsp, "XdndAware", False);
|
server.atom.XdndAware = XInternAtom(server.dsp, "XdndAware", False);
|
||||||
server.atom.XdndPosition = XInternAtom(server.dsp, "XdndPosition", False);
|
server.atom.XdndPosition = XInternAtom(server.dsp, "XdndPosition", False);
|
||||||
server.atom.XdndStatus = XInternAtom(server.dsp, "XdndStatus", False);
|
server.atom.XdndStatus = XInternAtom(server.dsp, "XdndStatus", False);
|
||||||
|
server.atom.XdndLeave = XInternAtom(server.dsp, "XdndLeave", False);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -69,6 +69,7 @@ typedef struct Global_atom
|
||||||
Atom XdndAware;
|
Atom XdndAware;
|
||||||
Atom XdndPosition;
|
Atom XdndPosition;
|
||||||
Atom XdndStatus;
|
Atom XdndStatus;
|
||||||
|
Atom XdndLeave;
|
||||||
} Global_atom;
|
} Global_atom;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -708,6 +708,7 @@ int main (int argc, char *argv[])
|
||||||
Panel *panel;
|
Panel *panel;
|
||||||
GSList *it;
|
GSList *it;
|
||||||
struct timeval* timeout;
|
struct timeval* timeout;
|
||||||
|
int hidden_dnd = 0;
|
||||||
|
|
||||||
start:
|
start:
|
||||||
init (argc, argv);
|
init (argc, argv);
|
||||||
|
@ -791,11 +792,17 @@ start:
|
||||||
else if (e.type == LeaveNotify)
|
else if (e.type == LeaveNotify)
|
||||||
autohide_trigger_hide(panel);
|
autohide_trigger_hide(panel);
|
||||||
if (panel->is_hidden) {
|
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);
|
autohide_show(panel);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
continue; // discard further processing of this event because the panel is not visible yet
|
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) {
|
switch (e.type) {
|
||||||
|
|
Loading…
Reference in a new issue