diff --git a/app.c b/app.c index 29a6751..e95bde4 100644 --- a/app.c +++ b/app.c @@ -92,7 +92,7 @@ int appInit(App *app, const char *touch_dev) { #ifdef DOCK LOGDBG("app: init: set window as dock"); Atom awt = XInternAtom(app->dpy, "_NET_WM_WINDOW_TYPE", False); - Atom awtv = XInternAtom(app->dpy, "_NET_WM_WINDOW_TYPE_DOCK", False); + Atom awtv = XInternAtom(app->dpy, DOCK_TYPE, False); XChangeProperty(app->dpy, app->win, awt, XA_ATOM, 32, PropModeReplace, (unsigned char*)&awtv, 1); Atom aaa = XInternAtom(app->dpy, "_NET_WM_ALLOWED_ACTIONS", False); XChangeProperty(app->dpy, app->win, aaa, XA_ATOM, 32, PropModeReplace, NULL, 0); diff --git a/config.h.example b/config.h.example index 11579bc..c608286 100644 --- a/config.h.example +++ b/config.h.example @@ -11,6 +11,8 @@ //#define TOP #define SCREEN_EVENTS +#define DOCK_TYPE "_NET_WM_WINDOW_TYPE_DOCK" + #define WIDTH_SCALE 1/1 // (nominator)/(denomitator) #define HEIGHT_SCALE 2/5 //#define WIDTH_SCALE_P 1/1 // scales for portrait mode, if you need different diff --git a/maemo/config.bottom.h b/maemo/config.bottom.h index 705e73e..a6918b0 100644 --- a/maemo/config.bottom.h +++ b/maemo/config.bottom.h @@ -1,36 +1,10 @@ #ifndef CONFIG_H #define CONFIG_H +#include "config.common.h" #define NOBORDER -#define NOTITLE -#define LOCK_SIZE -//#define DOCK -//#define TOP_RESIZE -//#define TOP -#define SCREEN_EVENTS - -#define WIDTH_SCALE 1/1 // (nominator)/(denomitator) -#define HEIGHT_SCALE 2/5 -#define WIDTH_SCALE_P 1/1 // scales for portrait mode, if you need different -#define HEIGHT_SCALE_P 1/3 // you need to comment/uncomment both lines - -#define TITLE "coolkbd" -#define MIN_WIDTH 200 -#define MIN_HEIGHT 100 -#define LONGPRESS_MS 1500 - -#define FONTS { "DejaVu Sans:bold", "DejaVu Sans", "DejaVu" } -#define FONT_SIZES { 2, 3, 4, 6, 8, 10, 12, 16, 18, 24, 32, 40, 48 } -#define FONT_MAX_SIZES 16 - -#define TOUCH_THRESHOLD0 0.3 // threshold for detect a touch should be a bit greater -#define TOUCH_THRESHOLD1 0.2 // then threshold to detect resease - -#define LABEL_MAXLEN 32 - -#define KEY_BORDER 2 // see also S in layout.defs.h #endif diff --git a/maemo/config.common.h b/maemo/config.common.h new file mode 100644 index 0000000..65b7f88 --- /dev/null +++ b/maemo/config.common.h @@ -0,0 +1,37 @@ +#ifndef CONFIG_COMMON_H +#define CONFIG_COMMON_H + + +//#define NOBORDER +#define NOTITLE +#define LOCK_SIZE +//#define DOCK +//#define TOP_RESIZE +//#define TOP +#define SCREEN_EVENTS + +#define DOCK_TYPE "_NET_WM_WINDOW_TYPE_TOOLBAR" + +#define WIDTH_SCALE 1/1 // (nominator)/(denomitator) +#define HEIGHT_SCALE 2/5 +#define WIDTH_SCALE_P 1/1 // scales for portrait mode, if you need different +#define HEIGHT_SCALE_P 1/3 // you need to comment/uncomment both lines + +#define TITLE "coolkbd" +#define MIN_WIDTH 200 +#define MIN_HEIGHT 100 +#define LONGPRESS_MS 1500 + +#define FONTS { "DejaVu Sans:bold", "DejaVu Sans", "DejaVu" } +#define FONT_SIZES { 2, 3, 4, 6, 8, 10, 12, 16, 18, 24, 32, 40, 48 } +#define FONT_MAX_SIZES 16 + +#define TOUCH_THRESHOLD0 0.3 // threshold for detect a touch should be a bit greater +#define TOUCH_THRESHOLD1 0.2 // then threshold to detect resease + +#define LABEL_MAXLEN 32 + +#define KEY_BORDER 2 // see also S in layout.defs.h + + +#endif diff --git a/maemo/config.dock.h b/maemo/config.dock.h index fe1ff98..b84ddd3 100644 --- a/maemo/config.dock.h +++ b/maemo/config.dock.h @@ -1,36 +1,10 @@ #ifndef CONFIG_H #define CONFIG_H +#include "config.common.h" -//#define NOBORDER -//#define NOTITLE -//#define LOCK_SIZE #define DOCK -//#define TOP_RESIZE -//#define TOP -#define SCREEN_EVENTS - -#define WIDTH_SCALE 1/1 // (nominator)/(denomitator) -#define HEIGHT_SCALE 2/5 -#define WIDTH_SCALE_P 1/1 // scales for portrait mode, if you need different -#define HEIGHT_SCALE_P 1/3 // you need to comment/uncomment both lines - -#define TITLE "coolkbd" -#define MIN_WIDTH 200 -#define MIN_HEIGHT 100 -#define LONGPRESS_MS 1500 - -#define FONTS { "DejaVu Sans:bold", "DejaVu Sans", "DejaVu" } -#define FONT_SIZES { 2, 3, 4, 6, 8, 10, 12, 16, 18, 24, 32, 40, 48 } -#define FONT_MAX_SIZES 16 - -#define TOUCH_THRESHOLD0 0.3 // threshold for detect a touch should be a bit greater -#define TOUCH_THRESHOLD1 0.2 // then threshold to detect resease - -#define LABEL_MAXLEN 32 - -#define KEY_BORDER 2 // see also S in layout.defs.h #endif diff --git a/maemo/config.top.h b/maemo/config.top.h index 5719e87..42ba191 100644 --- a/maemo/config.top.h +++ b/maemo/config.top.h @@ -1,36 +1,11 @@ #ifndef CONFIG_H #define CONFIG_H +#include "config.common.h" #define NOBORDER -#define NOTITLE -#define LOCK_SIZE -//#define DOCK -//#define TOP_RESIZE #define TOP -#define SCREEN_EVENTS - -#define WIDTH_SCALE 1/1 // (nominator)/(denomitator) -#define HEIGHT_SCALE 2/5 -#define WIDTH_SCALE_P 1/1 // scales for portrait mode, if you need different -#define HEIGHT_SCALE_P 1/3 // you need to comment/uncomment both lines - -#define TITLE "coolkbd" -#define MIN_WIDTH 200 -#define MIN_HEIGHT 100 -#define LONGPRESS_MS 1500 - -#define FONTS { "DejaVu Sans:bold", "DejaVu Sans", "DejaVu" } -#define FONT_SIZES { 2, 3, 4, 6, 8, 10, 12, 16, 18, 24, 32, 40, 48 } -#define FONT_MAX_SIZES 16 - -#define TOUCH_THRESHOLD0 0.3 // threshold for detect a touch should be a bit greater -#define TOUCH_THRESHOLD1 0.2 // then threshold to detect resease - -#define LABEL_MAXLEN 32 - -#define KEY_BORDER 2 // see also S in layout.defs.h #endif