Skip to content

Commit

Permalink
Fixed monocle and fullscreen for multi-monitor use
Browse files Browse the repository at this point in the history
  • Loading branch information
JLErvin committed Dec 28, 2018
1 parent 46b5a77 commit b9f6f9b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
Binary file modified berry
Binary file not shown.
Binary file modified berryc
Binary file not shown.
12 changes: 8 additions & 4 deletions wm.c
Original file line number Diff line number Diff line change
Expand Up @@ -419,8 +419,10 @@ free_monitors(void)
static void
fullscreen(struct client *c)
{
move_absolute(c, 0, 0);
resize_absolute(c, screen_width, screen_height);
int mon;
mon = ws_m_list[c->ws];
move_absolute(c, m_list[mon].x, m_list[mon].y);
resize_absolute(c, m_list[mon].w, m_list[mon].h);
if (!c->fullscreen)
XChangeProperty(display, c->win, net_atom[NetWMState], XA_ATOM, 32, PropModeReplace, (unsigned char *)&net_atom[NetWMStateFullscreen], 1);
else
Expand Down Expand Up @@ -1022,8 +1024,10 @@ move_to_front(struct client *c)
static void
monocle(struct client *c)
{
move_absolute(c, 0, conf.top_gap);
resize_absolute(c, screen_width, screen_height - conf.top_gap);
int mon;
mon = ws_m_list[c->ws];
move_absolute(c, m_list[mon].x, m_list[mon].y + conf.top_gap);
resize_absolute(c, m_list[mon].w, m_list[mon].h - conf.top_gap);
}

static void
Expand Down

0 comments on commit b9f6f9b

Please sign in to comment.