Skip to content

Commit

Permalink
fakefullscreen vs fakefullscreenclient compatibility, let fakefullscr…
Browse files Browse the repository at this point in the history
…een take precedence
  • Loading branch information
bakkeby committed May 13, 2021
1 parent 0b5bc76 commit 7fe81a6
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion config.def.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ static const int showsystray = 1; /* 0 means no systray */
static int tagindicatortype = INDICATOR_TOP_LEFT_SQUARE;
static int tiledindicatortype = INDICATOR_NONE;
static int floatindicatortype = INDICATOR_TOP_LEFT_SQUARE;
#if FAKEFULLSCREEN_CLIENT_PATCH
#if FAKEFULLSCREEN_CLIENT_PATCH && !FAKEFULLSCREEN_PATCH
static int fakefsindicatortype = INDICATOR_PLUS;
static int floatfakefsindicatortype = INDICATOR_PLUS_AND_LARGER_SQUARE;
#endif // FAKEFULLSCREEN_CLIENT_PATCH
Expand Down
14 changes: 7 additions & 7 deletions dwm.c
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ typedef struct {
int iscentered;
#endif // CENTER_PATCH
int isfloating;
#if SELECTIVEFAKEFULLSCREEN_PATCH && FAKEFULLSCREEN_CLIENT_PATCH
#if SELECTIVEFAKEFULLSCREEN_PATCH && FAKEFULLSCREEN_CLIENT_PATCH && !FAKEFULLSCREEN_PATCH
int isfakefullscreen;
#endif // SELECTIVEFAKEFULLSCREEN_PATCH
#if ISPERMANENT_PATCH
Expand Down Expand Up @@ -539,7 +539,7 @@ typedef struct {
#else
#define PERMANENT
#endif // ISPERMANENT_PATCH
#if SELECTIVEFAKEFULLSCREEN_PATCH && FAKEFULLSCREEN_CLIENT_PATCH
#if SELECTIVEFAKEFULLSCREEN_PATCH && FAKEFULLSCREEN_CLIENT_PATCH && !FAKEFULLSCREEN_PATCH
#define FAKEFULLSCREEN , .isfakefullscreen = 1
#else
#define FAKEFULLSCREEN
Expand Down Expand Up @@ -846,7 +846,7 @@ applyrules(Client *c)
#if ISPERMANENT_PATCH
c->ispermanent = r->ispermanent;
#endif // ISPERMANENT_PATCH
#if SELECTIVEFAKEFULLSCREEN_PATCH && FAKEFULLSCREEN_CLIENT_PATCH
#if SELECTIVEFAKEFULLSCREEN_PATCH && FAKEFULLSCREEN_CLIENT_PATCH && !FAKEFULLSCREEN_PATCH
c->fakefullscreen = r->isfakefullscreen;
#endif // SELECTIVEFAKEFULLSCREEN_PATCH
#if SWALLOW_PATCH
Expand Down Expand Up @@ -1308,7 +1308,7 @@ clientmessage(XEvent *e)
if (cme->message_type == netatom[NetWMState]) {
if (cme->data.l[1] == netatom[NetWMFullscreen]
|| cme->data.l[2] == netatom[NetWMFullscreen]) {
#if FAKEFULLSCREEN_CLIENT_PATCH
#if FAKEFULLSCREEN_CLIENT_PATCH && !FAKEFULLSCREEN_PATCH
if (c->fakefullscreen == 2 && c->isfullscreen)
c->fakefullscreen = 3;
#endif // FAKEFULLSCREEN_CLIENT_PATCH
Expand Down Expand Up @@ -2002,7 +2002,7 @@ focusstack(const Arg *arg)
#if LOSEFULLSCREEN_PATCH
if (!selmon->sel)
return;
#elif FAKEFULLSCREEN_CLIENT_PATCH
#elif FAKEFULLSCREEN_CLIENT_PATCH && !FAKEFULLSCREEN_PATCH
if (!selmon->sel || (selmon->sel->isfullscreen && !selmon->sel->fakefullscreen))
return;
#else
Expand Down Expand Up @@ -2539,7 +2539,7 @@ movemouse(const Arg *arg)
if (!(c = selmon->sel))
return;
#if !FAKEFULLSCREEN_PATCH
#if FAKEFULLSCREEN_CLIENT_PATCH
#if FAKEFULLSCREEN_CLIENT_PATCH && !FAKEFULLSCREEN_PATCH
if (c->isfullscreen && c->fakefullscreen != 1) /* no support moving fullscreen windows by mouse */
return;
#else
Expand Down Expand Up @@ -2803,7 +2803,7 @@ resizeclient(Client *c, int x, int y, int w, int h)
c->mon->nmaster == 0)))
#endif //FLEXTILE_DELUXE_LAYOUT
)
#if FAKEFULLSCREEN_CLIENT_PATCH
#if FAKEFULLSCREEN_CLIENT_PATCH && !FAKEFULLSCREEN_PATCH
&& (c->fakefullscreen == 1 || !c->isfullscreen)
#else
&& !c->isfullscreen
Expand Down
2 changes: 1 addition & 1 deletion patch/bar_indicators.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ drawindicator(Monitor *m, Client *c, unsigned int occ, int x, int y, int w, int
void
drawstateindicator(Monitor *m, Client *c, unsigned int occ, int x, int y, int w, int h, unsigned int tag, int filled, int invert)
{
#if FAKEFULLSCREEN_CLIENT_PATCH
#if FAKEFULLSCREEN_CLIENT_PATCH && !FAKEFULLSCREEN_PATCH
if (c->fakefullscreen && c->isfloating)
drawindicator(m, c, occ, x, y, w, h, tag, filled, invert, floatfakefsindicatortype);
else if (c->fakefullscreen)
Expand Down
2 changes: 1 addition & 1 deletion patch/togglefullscreen.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ togglefullscreen(const Arg *arg)
if (!c)
return;

#if FAKEFULLSCREEN_CLIENT_PATCH
#if FAKEFULLSCREEN_CLIENT_PATCH && !FAKEFULLSCREEN_PATCH
if (c->fakefullscreen == 1) { // fake fullscreen --> fullscreen
c->fakefullscreen = 2;
setfullscreen(c, 1);
Expand Down

0 comments on commit 7fe81a6

Please sign in to comment.