[hackers] [wmii] Go full screen when the client dimensions match exactly the screen dimensions, this is a hack, but I think it is the way some apps expect things to 'work'

From: <uriel_AT_localhost.localdomain>
Date: Wed Oct 03 02:57:14 2007

changeset: 2215:f4a2175b0483
parent: 2210:a2561a21b185
user: uriel_AT_localhost.localdomain
date: Wed Oct 03 02:50:11 2007 +0200
summary: Go full screen when the client dimensions match exactly the screen dimensions, this is a hack, but I think it is the way some apps expect things to 'work'

diff -r 0a39783b3e3c -r f4a2175b0483 cmd/wmii/client.c
--- a/cmd/wmii/client.c Tue Oct 02 22:49:58 2007 +0800
+++ b/cmd/wmii/client.c Wed Oct 03 02:50:11 2007 +0200
@@ -39,6 +39,9 @@ create_client(XWindow w, XWindowAttribut
         c->w.type = WWindow;
         c->w.w = w;
         c->w.r = c->r;
+
+ if((Dx(c->r) == Dx(screen->r)) && (Dy(c->r) == Dy(screen->r)))
+ fullscreen(c, True);
 
         prop_client(c, xatom("WM_PROTOCOLS"));
         prop_client(c, xatom("WM_TRANSIENT_FOR"));
diff -r 0a39783b3e3c -r f4a2175b0483 cmd/wmii/mouse.c
--- a/cmd/wmii/mouse.c Tue Oct 02 22:49:58 2007 +0800
+++ b/cmd/wmii/mouse.c Wed Oct 03 02:50:11 2007 +0200
@@ -289,11 +289,7 @@ horiz:
                                         resize_frame(f->aprev, f->aprev->r);
                                 }
 
- if (f->aprev || f->anext) {
- remove_frame(f);
- f->area = fw->ra;
- insert_frame(fw->fp, f);
- } else if (f->area != fw->ra) {
+ if (fw->ra != f->area) {
                                         detach_from_area(f);
                                         attach_to_area(fw->ra, f);
                                 }
diff -r 0a39783b3e3c -r f4a2175b0483 cmd/wmii/x11.c
--- a/cmd/wmii/x11.c Tue Oct 02 22:49:58 2007 +0800
+++ b/cmd/wmii/x11.c Wed Oct 03 02:50:11 2007 +0200
@@ -122,8 +122,7 @@ Wfmt(Fmt *f) {
 /* Init */
 void
 initdisplay(void) {
- if(!(display = XOpenDisplay(nil)))
- fatal("couldn't open display");
+ display = XOpenDisplay(nil);
         scr.screen = DefaultScreen(display);
         scr.colormap = DefaultColormap(display, scr.screen);
         scr.visual = DefaultVisual(display, scr.screen);
diff -r 0a39783b3e3c -r f4a2175b0483 rc/rc.wmii.rc
--- a/rc/rc.wmii.rc Tue Oct 02 22:49:58 2007 +0800
+++ b/rc/rc.wmii.rc Wed Oct 03 02:50:11 2007 +0200
@@ -12,14 +12,13 @@ if(echo $0 | grep -s '(^|/)rc\.wmii\.loc
 }
 
 fn config_whatis {
- prog = `{@{path=$confpath whatis $1} | grep -v '^fn|=' || echo /dev/null}
+ prog = `{@{path=$confpath whatis $1} | grep -v '^fn|= ' || echo /dev/null}
         shift; echo $prog $*
 }
 
 if(! test -x $PLAN9/bin/read) {
         echo 'Can''t find the ''read'' command' >[1=2]
         xmessage -file - <<'!'
- path=$oldpath
         exec `{config_whatis wmiirc}
 }
 rc.wmii can't run:
Received on Wed Oct 03 2007 - 02:57:14 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:58:27 UTC