Add a y-offset.

This commit is contained in:
Qball Cow 2014-05-15 16:54:35 +02:00
parent 1b9d4fb325
commit 82bdb5f348
4 changed files with 8 additions and 2 deletions

View File

@ -67,5 +67,6 @@ Settings config = {
.wmode = VERTICAL,
// Padding of the window.
.padding = 5,
.show_title = 1
.show_title = 1,
.y_offset = 0
};

View File

@ -101,8 +101,10 @@ typedef struct _Settings
WindowLocation location;
WindowMode wmode;
unsigned int padding;
int y_offset;
unsigned int show_title;
} Settings;
extern Settings config;

View File

@ -1227,6 +1227,8 @@ MenuReturn menu ( char **lines, char **input, char *prompt, Time *time, int *shi
default:
break;
}
// Apply offset.
y+= config.y_offset;
XMoveResizeWindow ( display, box, x, y, w, h );

View File

@ -63,7 +63,8 @@ XrmOption xrmOptions[] = {
{ xrm_Number, "padding", { .num = &config.padding } },
{ xrm_Number, "borderwidth", { .num = &config.menu_bw } },
{ xrm_String, "terminal", { .str = &config.terminal_emulator } },
{ xrm_Number, "location", { .num = &config.location} },
{ xrm_Number, "location", { .num = &config.location } },
{ xrm_Number, "yoffset", { .num = &config.y_offset } },
};