all repos — tint2 @ 357e37282aa2445b304067984a5f84d2d5b17379

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

*fix* finish dnd problems and autohide


git-svn-id: http://tint2.googlecode.com/svn/trunk@514 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
Andreas.Fink85 Andreas.Fink85@121b4492-b84c-0410-8b4c-0d4edfb3f3cc
commit

357e37282aa2445b304067984a5f84d2d5b17379

parent

72cdc495120d98f375f9138e67f6acdd8658a85b

5 files changed, 11 insertions(+), 6 deletions(-)

jump to
M src/panel.csrc/panel.c

@@ -71,11 +71,6 @@ GArray* backgrounds;

Imlib_Image default_icon; - -void autohide_hide(void* p); -void autohide_show(void* p); - - void default_panel() { panel1 = 0;
M src/panel.hsrc/panel.h

@@ -149,6 +149,7 @@ int click_clock(Panel *panel, int x, int y);

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);
M src/server.csrc/server.c

@@ -95,6 +95,7 @@ // drag 'n' drop

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); }
M src/server.hsrc/server.h

@@ -69,6 +69,7 @@ Atom _XEMBED_INFO;

Atom XdndAware; Atom XdndPosition; Atom XdndStatus; + Atom XdndLeave; } Global_atom;
M src/tint.csrc/tint.c

@@ -708,6 +708,7 @@ int x11_fd, i;

Panel *panel; GSList *it; struct timeval* timeout; + int hidden_dnd = 0; start: init (argc, argv);

@@ -791,10 +792,16 @@ autohide_trigger_show(panel);

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); } }