summaryrefslogtreecommitdiff
path: root/recordmydesktop/src/recordmydesktop.c
diff options
context:
space:
mode:
Diffstat (limited to 'recordmydesktop/src/recordmydesktop.c')
-rw-r--r--recordmydesktop/src/recordmydesktop.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/recordmydesktop/src/recordmydesktop.c b/recordmydesktop/src/recordmydesktop.c
index b3ba150..56d821a 100644
--- a/recordmydesktop/src/recordmydesktop.c
+++ b/recordmydesktop/src/recordmydesktop.c
@@ -100,6 +100,30 @@ int main(int argc,char **argv){
if((exit_status=InitializeData(&pdata,&enc_data,&cache_data))==0){
+ if(!strcmp(pdata.args.pause_shortcut,
+ pdata.args.stop_shortcut)||
+ RegisterShortcut(pdata.dpy,
+ pdata.specs.root,
+ pdata.args.pause_shortcut,
+ &(pdata.pause_key)) ||
+ RegisterShortcut(pdata.dpy,
+ pdata.specs.root,
+ pdata.args.stop_shortcut,
+ &(pdata.stop_key))){
+
+ fprintf(stderr,"Invalid shortcut,"
+ " or shortcuts are the same!\n\n"
+ "Using defaults.\n");
+
+ RegisterShortcut(pdata.dpy,
+ pdata.specs.root,
+ "Control+Mod1+p",
+ &(pdata.pause_key));
+ RegisterShortcut(pdata.dpy,
+ pdata.specs.root,
+ "Control+Mod1+s",
+ &(pdata.stop_key));
+ }
//this is where the capturing happens.
rmdThreads(&pdata);
© All Rights Reserved