mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-25 13:55:34 -05:00
Small fix!
This commit is contained in:
parent
5d5779ad1d
commit
4d37cf35dc
3 changed files with 23 additions and 23 deletions
|
@ -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.
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue