Skip to content

Commit

Permalink
Pushes some random debug change
Browse files Browse the repository at this point in the history
Signed-off-by: Dan Printzell <[email protected]>
  • Loading branch information
Vild committed Apr 13, 2016
1 parent 9b1fb58 commit ce1c6f2
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 6 deletions.
6 changes: 3 additions & 3 deletions dwin.desktop
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[Desktop Entry]
Encoding=UTF-8
Name=dwin
Name=DWin
Comment=A dynamic window manager written in D
Exec=dwin
Type=Application
Exec=/usr/bin/dwin -n -d 0
Type=XSession
16 changes: 16 additions & 0 deletions source/dwin/backend/xcb/xcb.d
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,22 @@ public:

log.Debug("notify: %s", *notify);

auto reply = xcb_get_atom_name_reply(connection, xcb_get_atom_name(connection, notify.atom), null);
if (reply) {
auto length = xcb_get_atom_name_name_length(reply);
auto name = xcb_get_atom_name_name(reply);

log.Debug("\tAtom: %s", name[0 .. length]);
}

/*foreach (wmAtom; EnumMembers!WMAtoms)
if (lookupWMAtoms[wmAtom.id] == notify.atom)
log.Debug("\t WMAtom: %s", wmAtom.name);
foreach (netAtom; EnumMembers!NETAtoms)
if (lookupNETAtoms[netAtom.id] == notify.atom)
log.Debug("\t NETAtom: %s", netAtom.name);*/

Window window = findWindow(notify.window);
if (window)
window.Update();
Expand Down
8 changes: 7 additions & 1 deletion source/dwin/backend/xcb/xcbwindow.d
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,13 @@ public:
@property override bool IsSticky() {
import std.algorithm.searching : canFind;

return states.canFind(xcb.EWMH._NET_WM_STATE_STICKY);
return states.canFind(xcb.EWMH._NET_WM_STATE_STICKY) ||
states.canFind(xcb.EWMH._NET_WM_WINDOW_TYPE_TOOLBAR) ||
states.canFind(xcb.EWMH._NET_WM_WINDOW_TYPE_MENU) ||
states.canFind(xcb.EWMH._NET_WM_WINDOW_TYPE_SPLASH) ||
states.canFind(xcb.EWMH._NET_WM_WINDOW_TYPE_TOOLTIP) ||
states.canFind(xcb.EWMH._NET_WM_WINDOW_TYPE_NOTIFICATION)
;
}

private:
Expand Down
5 changes: 3 additions & 2 deletions source/dwin/dwin.d
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,9 @@ private:
void onRemoveWindow(Window window) {
log.Info("Remove Window: %s", window);

auto scr = engine.FindScreen(window.X, window.Y);
scr.Remove(window);
//auto scr = engine.FindScreen(window.X, window.Y);
//scr.Remove(window);
window.Parent.Remove(window);
}

void onRequestShowWindow(Window window) {
Expand Down

0 comments on commit ce1c6f2

Please sign in to comment.