summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/config.c4
-rw-r--r--include/rofi.h20
-rw-r--r--source/rofi.c22
3 files changed, 23 insertions, 23 deletions
diff --git a/config/config.c b/config/config.c
index d2887ea4..ec8cdb69 100644
--- a/config/config.c
+++ b/config/config.c
@@ -61,8 +61,8 @@ Settings config = {
.window_key = "F12",
.run_key = "mod1+F2",
.ssh_key = "mod1+F3",
- // Location of the window. CENTER, NORTH_WEST, NORTH,NORTH_EAST, etc.
- .location = CENTER,
+ // Location of the window. WL_CENTER, WL_NORTH_WEST, WL_NORTH,WL_NORTH_EAST, etc.
+ .location = WL_CENTER,
// Mode of window, list (Vertical) or dmenu like (Horizontal)
.wmode = VERTICAL,
// Padding of the window.
diff --git a/include/rofi.h b/include/rofi.h
index 9f860632..6e6f1310 100644
--- a/include/rofi.h
+++ b/include/rofi.h
@@ -1,6 +1,6 @@
#ifndef __SIMPLESWITCHER_H__
#define __SIMPLESWITCHER_H__
-
+#include <config.h>
#include <X11/X.h>
#define MAX(a, b) ((a) > (b) ? (a) : (b))
@@ -52,15 +52,15 @@ void* reallocate( void *ptr, unsigned long bytes );
void catch_exit( __attribute__( ( unused ) ) int sig );
typedef enum _WindowLocation {
- CENTER = 0,
- NORTH_WEST = 1,
- NORTH = 2,
- NORTH_EAST = 3,
- EAST = 4,
- EAST_SOUTH = 5,
- SOUTH = 6,
- SOUTH_WEST = 7,
- WEST = 8
+ WL_CENTER = 0,
+ WL_NORTH_WEST = 1,
+ WL_NORTH = 2,
+ WL_NORTH_EAST = 3,
+ WL_EAST = 4,
+ WL_EAST_SOUTH = 5,
+ WL_SOUTH = 6,
+ WL_SOUTH_WEST = 7,
+ WL_WEST = 8
} WindowLocation;
typedef enum {
diff --git a/source/rofi.c b/source/rofi.c
index 91c34097..edfd614c 100644
--- a/source/rofi.c
+++ b/source/rofi.c
@@ -26,7 +26,6 @@
*
*/
-#include <config.h>
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
@@ -52,6 +51,8 @@
#include <X11/Xresource.h>
#include <X11/extensions/Xinerama.h>
+#include "rofi.h"
+
#ifdef HAVE_I3_IPC_H
#include <errno.h>
#include <linux/un.h>
@@ -62,7 +63,6 @@
#include <basedir.h>
-#include "rofi.h"
#include "run-dialog.h"
#include "ssh-dialog.h"
#include "dmenu-dialog.h"
@@ -950,35 +950,35 @@ MenuReturn menu( char **lines, char **input, char *prompt, Time *time, int *shif
// Determine window location
switch ( config.location ) {
- case NORTH_WEST:
+ case WL_NORTH_WEST:
x=mon.x;
- case NORTH:
+ case WL_NORTH:
y=mon.y;
break;
- case NORTH_EAST:
+ case WL_NORTH_EAST:
y=mon.y;
- case EAST:
+ case WL_EAST:
x=mon.x+mon.w-w;
break;
- case EAST_SOUTH:
+ case WL_EAST_SOUTH:
x=mon.x+mon.w-w;
- case SOUTH:
+ case WL_SOUTH:
y=mon.y+mon.h-h;
break;
- case SOUTH_WEST:
+ case WL_SOUTH_WEST:
y=mon.y+mon.h-h;
- case WEST:
+ case WL_WEST:
x=mon.x;
break;
- case CENTER:
+ case WL_CENTER:
default:
break;
}