[dev] [dwm] Patch for fullscreen mplayer

From: Jack Dagger <jackdagger23_AT_yahoo.com>
Date: Tue, 26 Apr 2011 00:30:11 -0700 (PDT)

This pull request fix fullscreen for mplayer and maybe similar programs. I have defined mplayer in config.h as floating application. A issue occur when I change to tag where is running mplayer with fullscreen mode, then dwm is trying to resize mplayer, which makes that the alignment of a film image is changed. Maybe this pull request will be useful for someone. This pull request is made for the current version in hg (changeset 1537). ----------------------- --- dwm-orig/dwm.c��� 2011-04-26 08:28:18.000000000 +0200 +++ dwm/dwm.c��� 2011-04-26 08:28:35.000000000 +0200 @@ -88,7 +88,7 @@ struct Client { ���� int basew, baseh, incw, inch, maxw, maxh, minw, minh; ���� int bw, oldbw; ���� unsigned int tags; -��� Bool isfixed, isfloating, isurgent, neverfocus, oldstate; +�� Bool isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen; ���� Client *next; ���� Client *snext; ���� Monitor *mon; @@ -532,6 +532,7 @@ clientmessage(XEvent *e) { ���� ��� if(cme->data.l[0]) { ���� ��� ��� XChangeProperty(dpy, cme->window, netatom[NetWMState], XA_ATOM, 32, ���� ��� ��� ��������������� PropModeReplace, (unsigned char*)&netatom[NetWMFullscreen], 1); +��� ��� � c->isfullscreen = True; ���� ��� ��� c->oldstate = c->isfloating; ���� ��� ��� c->oldbw = c->bw; ���� ��� ��� c->bw = 0; @@ -542,6 +543,7 @@ clientmessage(XEvent *e) { ���� ��� else { ���� ��� ��� XChangeProperty(dpy, cme->window, netatom[NetWMState], XA_ATOM, 32, ���� ��� ��� ��������������� PropModeReplace, (unsigned char*)0, 0); +��� ��� � c->isfullscreen = False; ���� ��� ��� c->isfloating = c->oldstate; ���� ��� ��� c->bw = c->oldbw; ���� ��� ��� c->x = c->oldx; @@ -1584,7 +1586,7 @@ showhide(Client *c) { ���� ��� return; ���� if(ISVISIBLE(c)) { /* show clients top down */ ���� ��� XMoveWindow(dpy, c->win, c->x, c->y); -��� ��� if(!c->mon->lt[c->mon->sellt]->arrange || c->isfloating) +��� �� if((!c->mon->lt[c->mon->sellt]->arrange || c->isfloating) && !c->isfullscreen) ���� ��� ��� resize(c, c->x, c->y, c->w, c->h, False); ���� ��� showhide(c->snext); ���� } ----------------------- Best regards, Jack Dagger
Received on Tue Apr 26 2011 - 09:30:11 CEST

This archive was generated by hypermail 2.2.0 : Tue Apr 26 2011 - 09:36:03 CEST