# HG changeset patch # User Space Falcon # Date 1441615410 0 # Node ID e54abee27e8f4fcf0dbd9be69958408002ad49a6 # Parent 312778104f545e5e998c636887883c5e3f8bcb35 lcdemu: window size hints set correctly diff -r 312778104f54 -r e54abee27e8f lcdemu/window.c --- 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 #include +#include +#include #include #include #include @@ -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() {