1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-01-05 21:34:17 +01:00

Define TITLEBAR_HEIGHT in default configuration file

...and use it in src/placement.c

And while we are at it, clean up a bit the visual of wconfig.h.in
This commit is contained in:
Carlos R. Mafra
2009-08-28 20:59:47 +02:00
parent 2f87d01a41
commit 328251c68a
2 changed files with 87 additions and 187 deletions

View File

@@ -324,7 +324,7 @@ static void set_width_height(WWindow *wwin, unsigned int *width, unsigned int *h
*height += wwin->frame->top_width + wwin->frame->bottom_width; *height += wwin->frame->top_width + wwin->frame->bottom_width;
} else { } else {
if (HAS_TITLEBAR(wwin)) if (HAS_TITLEBAR(wwin))
*height += 18; *height += TITLEBAR_HEIGHT;
if (HAS_RESIZEBAR(wwin)) if (HAS_RESIZEBAR(wwin))
*height += RESIZEBAR_HEIGHT; *height += RESIZEBAR_HEIGHT;
} }

View File

@@ -28,54 +28,35 @@
/*** Change this file (wconfig.h) *after* you ran configure ***/ /*** Change this file (wconfig.h) *after* you ran configure ***/
/* /*
*-------------------------------------------------------------------- * Comment out the following #defines if you want to disable a feature.
* Feature Selection * Also check the features you can enable through configure.
*
* Comment out the following #defines if you want to
* disable a feature.
* Also check the features you can enable through configure.
*--------------------------------------------------------------------
*/ */
/* /*
* #undefine if you dont want texture plugin support or your system have * #undefine if you dont want texture plugin support or your system have
* some sort of problem with them. * some sort of problem with them.
*/ */
#define TEXTURE_PLUGIN #define TEXTURE_PLUGIN
#ifdef TEXTURE_PLUGIN
#ifdef TEXTURE_PLUGIN #undef DRAWSTRING_PLUGIN
#undef DRAWSTRING_PLUGIN
#endif #endif
/* If you want animations for iconification, shading, icon arrangement etc. */
/* undefine ANIMATIONS if you don't want animations for iconification,
* shading, icon arrangement etc. */
#define ANIMATIONS #define ANIMATIONS
/* undefine it if you don't want your config files to be preprocessed by cpp */
/*
* undefine USECPP if you don't want your config files to be preprocessed
* by cpp
*/
#define USECPP #define USECPP
/* #define CPP_PATH @CPP_PATH@ */ /* #define CPP_PATH @CPP_PATH@ */
#define NETWM_HINTS #define NETWM_HINTS
/* /* support for XDND drop in the Dock. Experimental */
* support for XDND drop in the Dock. Experimental
*/
/*#define XDND*/ /*#define XDND*/
/* /* support for Motif window manager (mwm) window hints */
* support for Motif window manager (mwm) window hints
*/
#define MWM_HINTS #define MWM_HINTS
/* /*
* Undefine BALLOON_TEXT if you don't want balloons for showing extra * Undefine BALLOON_TEXT if you don't want balloons for showing extra
* information, like window titles that are not fully visible. * information, like window titles that are not fully visible.
@@ -89,7 +70,6 @@
*/ */
#define SHAPED_BALLOON #define SHAPED_BALLOON
/* /*
* Turn on a hack to make mouse and keyboard actions work even if * Turn on a hack to make mouse and keyboard actions work even if
* the NumLock or ScrollLock modifiers are turned on. They might * the NumLock or ScrollLock modifiers are turned on. They might
@@ -100,8 +80,6 @@
*/ */
#define NUMLOCK_HACK #define NUMLOCK_HACK
/* /*
* define OPTIMIZE_SHAPE if you want the shape setting code to be optimized * define OPTIMIZE_SHAPE if you want the shape setting code to be optimized
* for applications that change their shape frequently (like xdaliclock * for applications that change their shape frequently (like xdaliclock
@@ -118,20 +96,15 @@
*/ */
#undef CONFIGURE_WINDOW_WHILE_MOVING #undef CONFIGURE_WINDOW_WHILE_MOVING
/* disable/enable workspace indicator in the dock */
/*
* disable/enable workspace indicator in the dock
*/
#undef WS_INDICATOR #undef WS_INDICATOR
/* /*
* define HIDDENDOT if you want a dot to be shown in the application icon * define HIDDENDOT if you want a dot to be shown in the application icon
* of applications that are hidden. * of applications that are hidden.
*/ */
#define HIDDENDOT #define HIDDENDOT
/* /*
* Ignores the PPosition hint from clients. This is needed for some * Ignores the PPosition hint from clients. This is needed for some
* programs that have buggy implementations of such hint and place * programs that have buggy implementations of such hint and place
@@ -139,28 +112,14 @@
*/ */
#undef IGNORE_PPOSITION #undef IGNORE_PPOSITION
/* Do not scale application icon and miniwindow icon images */
/*
* Do not scale application icon and miniwindow icon images.
*/
#undef DONT_SCALE_ICONS #undef DONT_SCALE_ICONS
#define SILLYNESS #define SILLYNESS
/* /*
*..........................................................................
* The following options WILL NOT BE MADE RUN-TIME. Please do not request. * The following options WILL NOT BE MADE RUN-TIME. Please do not request.
* They will only add unneeded bloat. * They will only add unneeded bloat.
*..........................................................................
*/ */
/* /*
@@ -189,40 +148,26 @@
* is enabled. Only enable one of them. * is enabled. Only enable one of them.
*/ */
#undef WINDOW_BIRTH_ZOOM #undef WINDOW_BIRTH_ZOOM
#undef WINDOW_BIRTH_ZOOM2 #undef WINDOW_BIRTH_ZOOM2
/* /* whether arrow drawing in clip buttons should be gradiented */
* whether arrow drawing in clip buttons should be gradiented
*/
#undef GRADIENT_CLIP_ARROWS #undef GRADIENT_CLIP_ARROWS
/* /*
*-------------------------------------------------------------------- * Some of the following options can be configured in the preference files,
* Default Configuration * but if for some reason they can't, these are their defaults.
* *
* Some of the following options can be configured in * There are also some options that can only be configured here, at compile time.
* the preference files, but if for some reason, they can't
* be used, these defaults will be.
* There are also some options that can only be configured here,
* at compile time.
*--------------------------------------------------------------------
*/ */
/* list of paths to look for the config files, searched in order /* list of paths to look for the config files, searched in order of appearance */
* of appearance */ #define DEF_CONFIG_PATHS "~/GNUstep/Library/WindowMaker:"PKGDATADIR
#define DEF_CONFIG_PATHS \ #define DEF_MENU_FILE "menu"
"~/GNUstep/Library/WindowMaker:"PKGDATADIR
#define DEF_MENU_FILE "menu"
/* name of the script to execute at startup */ /* name of the script to execute at startup */
#define DEF_INIT_SCRIPT "autostart" #define DEF_INIT_SCRIPT "autostart"
#define DEF_EXIT_SCRIPT "exitscript" #define DEF_EXIT_SCRIPT "exitscript"
#define DEFAULTS_DIR "Defaults"
#define DEFAULTS_DIR "Defaults"
#ifdef USE_TIFF #ifdef USE_TIFF
#define DEF_BUTTON_IMAGES PKGDATADIR"/buttons.tiff" #define DEF_BUTTON_IMAGES PKGDATADIR"/buttons.tiff"
@@ -234,7 +179,6 @@
#define GLOBAL_PREAMBLE_MENU_FILE "GlobalMenu.pre" #define GLOBAL_PREAMBLE_MENU_FILE "GlobalMenu.pre"
#define GLOBAL_EPILOGUE_MENU_FILE "GlobalMenu.post" #define GLOBAL_EPILOGUE_MENU_FILE "GlobalMenu.post"
/* pixmap path */ /* pixmap path */
#define DEF_PIXMAP_PATHS \ #define DEF_PIXMAP_PATHS \
"(\"~/pixmaps\",\"~/GNUstep/Library/WindowMaker/Pixmaps\",\""PIXMAPDIR"\")" "(\"~/pixmaps\",\"~/GNUstep/Library/WindowMaker/Pixmaps\",\""PIXMAPDIR"\")"
@@ -249,36 +193,34 @@
#define DEF_ICON_PATHS \ #define DEF_ICON_PATHS \
"(\"~/pixmaps\",\"~/GNUstep/Library/Icons\",\"/usr/include/X11/pixmaps/\",\""PIXMAPDIR"\")" "(\"~/pixmaps\",\"~/GNUstep/Library/Icons\",\"/usr/include/X11/pixmaps/\",\""PIXMAPDIR"\")"
/* window title to use for untitled windows */ /* window title to use for untitled windows */
#define DEF_WINDOW_TITLE "Untitled" #define DEF_WINDOW_TITLE "Untitled"
/* default style */ /* default style */
#define DEF_FRAME_COLOR "white" #define DEF_FRAME_COLOR "white"
/* default fonts */
#define DEF_TITLE_FONT "\"Trebuchet MS,Luxi Sans:bold:pixelsize=12\"" #define DEF_TITLE_FONT "\"Trebuchet MS,Luxi Sans:bold:pixelsize=12\""
#define DEF_MENU_TITLE_FONT "\"Trebuchet MS,Luxi Sans:bold:pixelsize=12\"" #define DEF_MENU_TITLE_FONT "\"Trebuchet MS,Luxi Sans:bold:pixelsize=12\""
#define DEF_MENU_ENTRY_FONT "\"Trebuchet MS,Luxi Sans:pixelsize=12\"" #define DEF_MENU_ENTRY_FONT "\"Trebuchet MS,Luxi Sans:pixelsize=12\""
#define DEF_ICON_TITLE_FONT "\"Arial,Luxi Sans:pixelsize=9\"" #define DEF_ICON_TITLE_FONT "\"Arial,Luxi Sans:pixelsize=9\""
#define DEF_CLIP_TITLE_FONT "\"Verdana:bold:pixelsize=10\"" #define DEF_CLIP_TITLE_FONT "\"Verdana:bold:pixelsize=10\""
#define DEF_INFO_TEXT_FONT "\"Trebuchet MS,Luxi Sans:pixelsize=12\"" #define DEF_INFO_TEXT_FONT "\"Trebuchet MS,Luxi Sans:pixelsize=12\""
#define DEF_WORKSPACE_NAME_FONT "\"Trebuchet MS,Luxi Sans:pixelsize=24\"" #define DEF_WORKSPACE_NAME_FONT "\"Trebuchet MS,Luxi Sans:pixelsize=24\""
/* line width of the move/resize frame */
#define DEF_FRAME_THICKNESS 1 /* linewidth of the move/resize frame */ #define DEF_FRAME_THICKNESS 1
#define DEF_WINDOW_TITLE_EXTEND_SPACE "0" #define DEF_WINDOW_TITLE_EXTEND_SPACE "0"
#define DEF_MENU_TITLE_EXTEND_SPACE "0" #define DEF_MENU_TITLE_EXTEND_SPACE "0"
#define DEF_MENU_TEXT_EXTEND_SPACE "0" #define DEF_MENU_TEXT_EXTEND_SPACE "0"
#define TITLEBAR_EXTEND_SPACE 4 #define TITLEBAR_EXTEND_SPACE 4
#define DEF_XPM_CLOSENESS 40000 #define DEF_XPM_CLOSENESS 40000
/* default position of application menus */ /* default position of application menus */
#define DEF_APPMENU_X 10 #define DEF_APPMENU_X 10
#define DEF_APPMENU_Y 10 #define DEF_APPMENU_Y 10
/* calculate window edge resistance from edge resistance */ /* calculate window edge resistance from edge resistance */
#define WIN_RESISTANCE(x) (((x)*20)/30) #define WIN_RESISTANCE(x) (((x)*20)/30)
@@ -294,8 +236,7 @@
* time exceeds this value, it is immediately finished. Usefull for * time exceeds this value, it is immediately finished. Usefull for
* moments of high-load. * moments of high-load.
*/ */
#define MAX_ANIMATION_TIME 1 #define MAX_ANIMATION_TIME 1
/* Zoom animation */ /* Zoom animation */
#define MINIATURIZE_ANIMATION_FRAMES_Z 5 #define MINIATURIZE_ANIMATION_FRAMES_Z 5
#define MINIATURIZE_ANIMATION_STEPS_Z 12 #define MINIATURIZE_ANIMATION_STEPS_Z 12
@@ -311,21 +252,14 @@
#define MINIATURIZE_ANIMATION_DELAY_F 20000 #define MINIATURIZE_ANIMATION_DELAY_F 20000
#define MINIATURIZE_ANIMATION_TWIST_F 0.5 #define MINIATURIZE_ANIMATION_TWIST_F 0.5
#define HIDE_ANIMATION_STEPS (MINIATURIZE_ANIMATION_STEPS*2/3) #define HIDE_ANIMATION_STEPS (MINIATURIZE_ANIMATION_STEPS*2/3)
/* delay before balloon is shown (ms) */ /* delays in ms...*/
#define BALLOON_DELAY 1000 #define BALLOON_DELAY 1000 /* ...before balloon is shown */
#define MENU_SELECT_DELAY 200 /* ...for menu item selection hysteresis */
#define MENU_JUMP_BACK_DELAY 400 /* ...for jumpback of scrolled menus */
/* delay for menu item selection hysteresis (ms) */ /* animation speed constants */
#define MENU_SELECT_DELAY 200
/* delay for jumpback of scrolled menus (ms) */
#define MENU_JUMP_BACK_DELAY 400
/* *** animation speed constants *** */
/* icon slide */
#define ICON_SLIDE_SLOWDOWN_UF 1 #define ICON_SLIDE_SLOWDOWN_UF 1
#define ICON_SLIDE_DELAY_UF 0 #define ICON_SLIDE_DELAY_UF 0
#define ICON_SLIDE_STEPS_UF 50 #define ICON_SLIDE_STEPS_UF 50
@@ -362,7 +296,6 @@
#define MENU_SCROLL_STEPS_US 1 #define MENU_SCROLL_STEPS_US 1
#define MENU_SCROLL_DELAY_US 8 #define MENU_SCROLL_DELAY_US 8
/* shade animation */ /* shade animation */
#define SHADE_STEPS_UF 5 #define SHADE_STEPS_UF 5
#define SHADE_DELAY_UF 0 #define SHADE_DELAY_UF 0
@@ -379,7 +312,6 @@
#define SHADE_STEPS_US 40 #define SHADE_STEPS_US 40
#define SHADE_DELAY_US 10 #define SHADE_DELAY_US 10
/* workspace name on switch display */ /* workspace name on switch display */
#define WORKSPACE_NAME_FADE_DELAY 30 #define WORKSPACE_NAME_FADE_DELAY 30
@@ -389,34 +321,32 @@
#define VIRTUALEDGE_SCROLL_HSTEP 30 #define VIRTUALEDGE_SCROLL_HSTEP 30
#endif #endif
#define WORKSPACE_NAME_DELAY 400 #define WORKSPACE_NAME_DELAY 400
/* window birth animation steps (DO NOT MAKE IT RUN-TIME) */ /* window birth animation steps (DO NOT MAKE IT RUN-TIME) */
#define WINDOW_BIRTH_STEPS 20 #define WINDOW_BIRTH_STEPS 20
/* number of steps for icon dematerialization. */ /* number of steps for icon dematerialization. */
#define DEMATERIALIZE_STEPS 16 #define DEMATERIALIZE_STEPS 16
/* Delay when cycling colors of selected icons. */ /* Delay when cycling colors of selected icons. */
#define COLOR_CYCLE_DELAY 200 #define COLOR_CYCLE_DELAY 200
/* size of the pieces in the undocked icon explosion */ /* size of the pieces in the undocked icon explosion */
#define ICON_KABOOM_PIECE_SIZE 4 #define ICON_KABOOM_PIECE_SIZE 4
/* Position increment for smart placement. >= 1 raise these values if it's
* too slow for you */
#define PLACETEST_HSTEP 8
#define PLACETEST_VSTEP 8
/*
* Position increment for smart placement: >= 1
* Raise these values if it's too slow for you
*/
#define PLACETEST_HSTEP 8
#define PLACETEST_VSTEP 8
#define DOCK_EXTRA_SPACE 0 #define DOCK_EXTRA_SPACE 0
/* Vicinity in which an icon can be attached to the clip */ /* Vicinity in which an icon can be attached to the clip */
#define CLIP_ATTACH_VICINITY 1 #define CLIP_ATTACH_VICINITY 1
#define CLIP_BUTTON_SIZE 23
#define CLIP_BUTTON_SIZE 23
/* The amount of space (in multiples of the icon size) /* The amount of space (in multiples of the icon size)
* a docked icon must be dragged out to detach it */ * a docked icon must be dragged out to detach it */
@@ -436,105 +366,76 @@
* Set this to zero if you want instant raise. */ * Set this to zero if you want instant raise. */
#define AUTO_RAISE_DELAY 600 #define AUTO_RAISE_DELAY 600
/* Max. number of icons the clip can have */ /* Max. number of icons the clip can have */
#define CLIP_MAX_ICONS 32 #define CLIP_MAX_ICONS 32
/* blink interval when invoking a menu item */ /* blink interval when invoking a menu item */
#define MENU_BLINK_DELAY 60000 #define MENU_BLINK_DELAY 60000
#define MENU_BLINK_COUNT 2 #define MENU_BLINK_COUNT 2
#define CURSOR_BLINK_RATE 300 #define CURSOR_BLINK_RATE 300
#define MOVE_THRESHOLD 5 /* how many pixels to move before dragging windows /* how many pixels to move before dragging windows and other objects */
* and other objects */ #define MOVE_THRESHOLD 5
#define KEY_CONTROL_WINDOW_WEIGHT 1
#define HRESIZE_THRESHOLD 3 #define HRESIZE_THRESHOLD 3
#define MAX_WORKSPACENAME_WIDTH 64 #define MAX_WORKSPACENAME_WIDTH 64
#define MAX_WINDOWLIST_WIDTH 160 /* max width of window title in /* max width of window title in window list */
* window list */ #define MAX_WINDOWLIST_WIDTH 160
#define KEY_CONTROL_WINDOW_WEIGHT 1
/* if your keyboard don't have arrow keys */ /* if your keyboard don't have arrow keys */
#undef ARROWLESS_KBD #undef ARROWLESS_KBD
/* don't put titles in miniwindows */ /* don't put titles in miniwindows */
#undef NO_MINIWINDOW_TITLES #undef NO_MINIWINDOW_TITLES
#define FRAME_BORDER_COLOR "black" #define FRAME_BORDER_COLOR "black"
/* for boxes with high mouse sampling rates (SGI) */ /* for boxes with high mouse sampling rates (SGI) */
#define DELAY_BETWEEN_MOUSE_SAMPLING 10 #define DELAY_BETWEEN_MOUSE_SAMPLING 10
/* /*
*----------------------------------------------------------------------
* You should not modify the following values, unless you know * You should not modify the following values, unless you know
* what you're doing. * what you're doing.
*----------------------------------------------------------------------
*/ */
/* number of window shortcuts */ /* number of window shortcuts */
#define MAX_WINDOW_SHORTCUTS 10 #define MAX_WINDOW_SHORTCUTS 10
#define WM_PI 3.14159265358979323846
#define WM_PI 3.14159265358979323846
#define FRAME_BORDER_WIDTH 1 /* width of window border for frames */
#define RESIZEBAR_HEIGHT 8 /* height of the resizebar */
#define RESIZEBAR_MIN_WIDTH 20 /* min. width of handles-corner_width */
#define RESIZEBAR_CORNER_WIDTH 28 /* width of the corner of resizebars */
#define MENU_INDICATOR_SPACE 12
/* minimum size for windows */
#define MIN_WINDOW_SIZE 5
#define MIN_TITLEFONT_HEIGHT(h) ((h)>14 ? (h) : 14) #define MIN_TITLEFONT_HEIGHT(h) ((h)>14 ? (h) : 14)
#define TITLEBAR_HEIGHT 18 /* window's titlebar height */
#define ICON_WIDTH 64 /* size of the icon window */ #define RESIZEBAR_HEIGHT 8 /* height of the resizebar */
#define ICON_HEIGHT 64 #define FRAME_BORDER_WIDTH 1 /* width of window border for frames */
#define ICON_BORDER_WIDTH 2 #define RESIZEBAR_MIN_WIDTH 20 /* min width of handles-corner_width */
#define RESIZEBAR_CORNER_WIDTH 28 /* width of the corner of resizebars */
#define MAX_ICON_WIDTH 60 /* size of the icon pixmap */ #define MENU_INDICATOR_SPACE 12
#define MAX_ICON_HEIGHT 48 #define MIN_WINDOW_SIZE 5 /* minimum size for windows */
#define ICON_WIDTH 64 /* size of the icon window */
#define MAX_WORKSPACES 100 #define ICON_HEIGHT 64
#define ICON_BORDER_WIDTH 2
#define MAX_MENU_TEXT_LENGTH 512 #define MAX_ICON_WIDTH 60 /* size of the icon pixmap */
#define MAX_ICON_HEIGHT 48
#define MAX_RESTART_ARGS 16 #define MAX_WORKSPACES 100
#define MAX_MENU_TEXT_LENGTH 512
#define MAX_DEAD_PROCESSES 128 #define MAX_RESTART_ARGS 16
#define MAX_DEAD_PROCESSES 128
#define MAXLINE 1024
#define MAXLINE 1024
#ifdef _MAX_PATH #ifdef _MAX_PATH
# define DEFAULT_PATH_MAX _MAX_PATH # define DEFAULT_PATH_MAX _MAX_PATH
#else #else
# define DEFAULT_PATH_MAX 512 # define DEFAULT_PATH_MAX 512
#endif #endif
#define DEBUG0 #define DEBUG0
/* some rules */ /* some rules */
#ifndef SHAPE #ifndef SHAPE
#undef SHAPED_BALLOON #undef SHAPED_BALLOON
#endif #endif
#ifdef XKB_MODELOCK #ifdef XKB_MODELOCK
#define KEEP_XKB_LOCK_STATUS #define KEEP_XKB_LOCK_STATUS
/* This is a hidden feature. /* This is a hidden feature.
* Choose just one of LANGUAGE_* hints. * Choose just one of LANGUAGE_* hints.
@@ -542,26 +443,25 @@
* More icons are welcome. * More icons are welcome.
*/ */
#define XKB_BUTTON_HINT #define XKB_BUTTON_HINT
#undef LANGUAGE_TH #undef LANGUAGE_TH
#undef LANGUAGE_SK #undef LANGUAGE_SK
#endif #endif
#ifndef DEMATERIALIZE_ICON #ifndef DEMATERIALIZE_ICON
# define NORMAL_ICON_KABOOM #define NORMAL_ICON_KABOOM
#endif #endif
#if defined(HAVE_LIBINTL_H) && defined(I18N) #if defined(HAVE_LIBINTL_H) && defined(I18N)
# include <libintl.h> #include <libintl.h>
# define _(text) gettext(text) #define _(text) gettext(text)
#else #else
# define _(text) (text) #define _(text) (text)
#endif #endif
#if defined(__GNUC__) && !defined(__STRICT_ANSI__) #if defined(__GNUC__) && !defined(__STRICT_ANSI__)
# define INLINE inline #define INLINE inline
#else #else
# define INLINE #define INLINE
#endif #endif
#endif /* WMCONFIG_H_ */ #endif /* WMCONFIG_H_ */