Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
sowm: Add titlebar exclude feature
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanaraps committed Feb 20, 2020
1 parent 0bfa633 commit 6f40867
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions sowm.c
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
// sowm - An itsy bitsy floating window manager.

#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/XF86keysym.h>
#include <X11/keysym.h>
#include <X11/XKBlib.h>
#include <stdlib.h>
#include <signal.h>
#include <unistd.h>
#include <string.h>

#include "sowm.h"

Expand Down Expand Up @@ -34,6 +36,11 @@ static void (*events[LASTEvent])(XEvent *e) = {
void title_add(client *c) {
if (c->t) return;

XClassHint cl;
XGetClassHint(d, c->w, &cl);

if (!strcmp(cl.res_name, "no-title")) return;

win_size(c->w, &wx, &wy, &ww, &wh);
c->t = XCreateSimpleWindow(d, root, wx, wy - TH, ww, TH, 0, TC, TC);
XMapWindow(d, c->t);
Expand Down

0 comments on commit 6f40867

Please sign in to comment.