[chronojump] slideNext/Prior now don't crash if Impress is not running
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] slideNext/Prior now don't crash if Impress is not running
- Date: Sat, 29 Apr 2017 13:18:36 +0000 (UTC)
commit 999729e82b63aa5abcbb3f1bd45223a660db9ca0
Author: Xavier de Blas <xaviblas gmail com>
Date: Thu Apr 27 22:03:30 2017 +0200
slideNext/Prior now don't crash if Impress is not running
testing-stuff/slideNext.sh | 11 ++++++++---
testing-stuff/slidePrior.sh | 10 +++++++---
2 files changed, 15 insertions(+), 6 deletions(-)
---
diff --git a/testing-stuff/slideNext.sh b/testing-stuff/slideNext.sh
index b4fba47..14da33b 100755
--- a/testing-stuff/slideNext.sh
+++ b/testing-stuff/slideNext.sh
@@ -1,7 +1,12 @@
#!/bin/sh
+#works when Impress is not fullscreen
export DISPLAY=:0.0
WINDOW=`xdotool search --name "Impress"`
#WINDOW=52428837
-xdotool windowactivate $WINDOW
-xdotool windowfocus $WINDOW
-xdotool key Next
+if ! test -z $WINDOW
+then
+ #echo $WINDOW
+ xdotool windowactivate $WINDOW
+ xdotool windowfocus $WINDOW
+ xdotool key Next
+fi
diff --git a/testing-stuff/slidePrior.sh b/testing-stuff/slidePrior.sh
index e1d590e..60412ea 100755
--- a/testing-stuff/slidePrior.sh
+++ b/testing-stuff/slidePrior.sh
@@ -1,7 +1,11 @@
#!/bin/sh
+#works when Impress is not fullscreen
export DISPLAY=:0.0
WINDOW=`xdotool search --name "Impress"`
#WINDOW=52428837
-xdotool windowactivate $WINDOW
-xdotool windowfocus $WINDOW
-xdotool key Prior
+if ! test -z $WINDOW
+then
+ xdotool windowactivate $WINDOW
+ xdotool windowfocus $WINDOW
+ xdotool key Prior
+fi
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]