summaryrefslogtreecommitdiff
path: root/beryl-plugins/src/neg.c
diff options
context:
space:
mode:
authorquinn <quinn@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2006-09-30 11:58:49 +0000
committerquinn <quinn@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2006-09-30 11:58:49 +0000
commit4de155464d8101b4dab13b659ae9054649fd015c (patch)
tree055f3de0d7e36ebff1477e5925d19a21b1188697 /beryl-plugins/src/neg.c
parentdfdec57999b80a630e7cbc1a4aba4eeed091b8b7 (diff)
downloadmarex-dev-4de155464d8101b4dab13b659ae9054649fd015c.tar.gz
marex-dev-4de155464d8101b4dab13b659ae9054649fd015c.tar.bz2
major overhaul of keybindings system
bump VERSION to 0.1.1 bump ABI VERSION to 4 git-svn-id: file:///beryl/trunk@406 d7aaf104-2d23-0410-ae22-9d23157bf5a3
Diffstat (limited to 'beryl-plugins/src/neg.c')
-rw-r--r--beryl-plugins/src/neg.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/beryl-plugins/src/neg.c b/beryl-plugins/src/neg.c
index 120d515..df6c0ab 100644
--- a/beryl-plugins/src/neg.c
+++ b/beryl-plugins/src/neg.c
@@ -493,7 +493,7 @@ NEGPaintWindow (CompWindow * w, const WindowPaintAttrib * attrib,
return status;
}
static void
-NEGDisplayInitOptions (NEGDisplay * nd, Display * display)
+NEGDisplayInitOptions (NEGDisplay * nd)
{
CompOption *o;
@@ -510,8 +510,8 @@ NEGDisplayInitOptions (NEGDisplay * nd, Display * display)
o->value.action.state = CompActionStateInitKey;
o->value.action.state |= CompActionStateInitButton;
o->value.action.key.modifiers = NEG_TOGGLE_MODIFIERS_DEFAULT;
- o->value.action.key.keycode =
- XKeysymToKeycode (display, XStringToKeysym (NEG_TOGGLE_KEY_DEFAULT));
+ o->value.action.key.keysym =
+ XStringToKeysym (NEG_TOGGLE_KEY_DEFAULT);
o = &nd->opt[NEG_DISPLAY_OPTION_SCREEN_TOGGLE];
o->name = "screen_toggle";
@@ -526,9 +526,8 @@ NEGDisplayInitOptions (NEGDisplay * nd, Display * display)
o->value.action.state = CompActionStateInitKey;
o->value.action.state |= CompActionStateInitButton;
o->value.action.key.modifiers = NEG_TOGGLE_ALL_MODIFIERS_DEFAULT;
- o->value.action.key.keycode =
- XKeysymToKeycode (display,
- XStringToKeysym (NEG_TOGGLE_ALL_KEY_DEFAULT));
+ o->value.action.key.keysym =
+ XStringToKeysym (NEG_TOGGLE_ALL_KEY_DEFAULT);
}
static CompOption *
@@ -544,9 +543,7 @@ NEGGetDisplayOptions (CompDisplay * display, int *count)
else
{
NEGDisplay * nd=malloc(sizeof(NEGDisplay));
- Display * d = XOpenDisplay(getenv("DISPLAY"));
- if(!d)exit(1);
- NEGDisplayInitOptions(nd,d);
+ NEGDisplayInitOptions(nd);
*count = NUM_OPTIONS(nd);
return nd->opt;
}
@@ -597,7 +594,7 @@ NEGInitDisplay (CompPlugin * p, CompDisplay * d)
}
/* initialize the display options */
- NEGDisplayInitOptions (nd, d->display);
+ NEGDisplayInitOptions (nd);
d->privates[displayPrivateIndex].ptr = nd;