changeset 904:e54abee27e8f

lcdemu: window size hints set correctly
author Space Falcon <falcon@ivan.Harhan.ORG>
date Mon, 07 Sep 2015 08:43:30 +0000
parents 312778104f54
children 841982f31be3
files lcdemu/window.c
diffstat 1 files changed, 3 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/lcdemu/window.c	Mon Sep 07 08:34:37 2015 +0000
+++ b/lcdemu/window.c	Mon Sep 07 08:43:30 2015 +0000
@@ -5,6 +5,8 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
+#include <strings.h>
 #include <X11/Xlib.h>
 #include <X11/Xresource.h>
 #include <X11/Xutil.h>
@@ -23,6 +25,7 @@
 	XColor bdcolor;
 	XClassHint xclasshint;
 	XWMHints wmhints;
+	XSizeHints wm_normal_hints;
 
 	/* Determine our geometry */
 	instquarks[0] = xrmquark_topinstance;
@@ -96,32 +99,14 @@
 		i = 0;
 	wmhints.initial_state = i ? IconicState : NormalState;
 	XSetWMHints(mydisplay, mainwindow, &wmhints);
-#if 0
 	if (geomask & (WidthValue|HeightValue))
 		wm_normal_hints.flags = USSize;
 	else
 		wm_normal_hints.flags = PSize;
 	if (geomask & (XValue|YValue))
 		wm_normal_hints.flags |= USPosition;
-	set_wm_normal_hints();
-#endif
-}
-
-#if 0
-set_wm_normal_hints()
-{
-	wm_normal_hints.min_width = MIN_COLUMNS * charcell_width;
-	wm_normal_hints.min_height = MIN_LINES * charcell_height;
-	wm_normal_hints.max_width = MAX_COLUMNS * charcell_width;
-	wm_normal_hints.max_height = MAX_LINES * charcell_height;
-	wm_normal_hints.width_inc = charcell_width;
-	wm_normal_hints.height_inc = charcell_height;
-	wm_normal_hints.base_width = 0;
-	wm_normal_hints.base_height = 0;
-	wm_normal_hints.flags |= PMinSize | PMaxSize | PResizeInc | PBaseSize;
 	XSetWMNormalHints(mydisplay, mainwindow, &wm_normal_hints);
 }
-#endif
 
 set_initial_window_title()
 {