File olvwm-hints.patch of Package xview
diff -rNu xview-3.2p1.4-old/clients/olvwm-4.1/winframe.c xview-3.2p1.4/clients/olvwm-4.1/winframe.c
--- xview-3.2p1.4-old/clients/olvwm-4.1/winframe.c 2013-08-25 12:53:40.808423679 +0200
+++ xview-3.2p1.4/clients/olvwm-4.1/winframe.c 2013-08-25 12:58:51.356428233 +0200
@@ -1666,7 +1666,16 @@
WinPane *paneInfo = (WinPane *)frameInfo->fcore.panewin;
int width,height;
int maxwidth;
-
+ int full_width, full_height;
+
+ full_width = DisplayWidth(client->dpy, client->screen) -
+ widthLeftFrame(frameInfo) -
+ widthRightFrame(frameInfo);
+
+ full_height = DisplayHeight(client->dpy, client->screen) -
+ heightTopFrame(frameInfo) -
+ heightBottomFrame(frameInfo);
+
if (frameInfo->fcore.fullsize) { /* going to restore/normal */
/* restore from saved values */
frameInfo->core.y = frameInfo->restoreY;
@@ -1692,9 +1701,7 @@
if (GRV.FullSizeZoomX) {
frameInfo->core.x = 0;
frameInfo->core.dirtyconfig |= CWX;
- maxwidth = DisplayWidth(client->dpy, client->screen) -
- widthLeftFrame(frameInfo) -
- widthRightFrame(frameInfo);
+ maxwidth = full_width;
}
else maxwidth = paneInfo->core.width;
@@ -1739,12 +1746,22 @@
/* else make it full screen height */
} else {
width = maxwidth;
- height = DisplayHeight(client->dpy,client->screen) -
- heightTopFrame(frameInfo) -
- heightBottomFrame(frameInfo);
+ height = full_height;
}
}
+ /* This workaround is needed, because Firefox, SeaMonkey and probably
+ * other applications, give broken hints. I'm not sure if it's bug in
+ * Firefox or in ol(v)wm.
+ */
+ if ((width > full_width) || (width <= 0)) {
+ width = maxwidth;
+ }
+
+ if ((height > full_height) || (height <= 0)) {
+ height = full_height;
+ }
+
/* Set the new pos/height */
(WinFunc(paneInfo,pcore.setsizefunc))(paneInfo,width,height);
WinCallConfig(client->dpy,paneInfo,NULL);
diff -rNu xview-3.2p1.4-old/clients/olwm/winframe.c xview-3.2p1.4/clients/olwm/winframe.c
--- xview-3.2p1.4-old/clients/olwm/winframe.c 2013-08-25 12:53:40.796423679 +0200
+++ xview-3.2p1.4/clients/olwm/winframe.c 2013-08-25 13:01:29.120430547 +0200
@@ -1520,7 +1520,16 @@
WinPaneFrame *frameInfo = client->framewin;
WinPane *paneInfo = (WinPane *)frameInfo->fcore.panewin;
int width,height;
-
+ int full_width, full_height;
+
+ full_width = DisplayWidth(client->dpy, client->screen) -
+ widthLeftFrame(frameInfo) -
+ widthRightFrame(frameInfo);
+
+ full_height = DisplayHeight(client->dpy, client->screen) -
+ heightTopFrame(frameInfo) -
+ heightBottomFrame(frameInfo);
+
if (frameInfo->fcore.fullsize) { /* going to restore/normal */
/* restore from saved values */
frameInfo->core.y = frameInfo->restoreY;
@@ -1570,12 +1579,22 @@
/* else make it full screen height */
} else {
width = paneInfo->core.width;
- height = DisplayHeight(client->dpy,client->screen) -
- heightTopFrame(frameInfo) -
- heightBottomFrame(frameInfo);
+ height = full_height;;
}
}
+ /* This workaround is needed, because Firefox, SeaMonkey and probably
+ * other applications, give broken hints. I'm not sure if it's bug in
+ * Firefox or in ol(v)wm.
+ */
+ if ((width > full_width) || (width <= 0)) {
+ width = paneInfo->core.width;
+ }
+
+ if ((height > full_height) || (height <= 0)) {
+ height = full_height;
+ }
+
/* Set the new pos/height */
(WinFunc(paneInfo,pcore.setsizefunc))(paneInfo,width,height);
WinCallConfig(client->dpy,paneInfo,NULL);