summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorenselic <enselic@f606c939-3180-4ac9-a4b8-4b8779d57d0a>2008-09-12 20:59:43 +0000
committerenselic <enselic@f606c939-3180-4ac9-a4b8-4b8779d57d0a>2008-09-12 20:59:43 +0000
commit6e47cbb9d80dc94751127502bb0786bfcfcc35db (patch)
tree1d099357f61be4327b5ece5b284648852313027a
parent98e747f9d2d94ff2e7c3673e3593a10394e1beb6 (diff)
src/recordmydesktop.c: Expand the unnecessary
QUERY_DISPLAY_SPECS()-macro. git-svn-id: https://recordmydesktop.svn.sourceforge.net/svnroot/recordmydesktop/trunk@510 f606c939-3180-4ac9-a4b8-4b8779d57d0a
-rw-r--r--recordmydesktop/src/recordmydesktop.c26
1 files changed, 12 insertions, 14 deletions
diff --git a/recordmydesktop/src/recordmydesktop.c b/recordmydesktop/src/recordmydesktop.c
index c919690..859477a 100644
--- a/recordmydesktop/src/recordmydesktop.c
+++ b/recordmydesktop/src/recordmydesktop.c
@@ -28,19 +28,6 @@
#include <recordmydesktop.h>
-#define QUERY_DISPLAY_SPECS(display,specstruct){\
- (specstruct)->screen=DefaultScreen(display);\
- (specstruct)->width=DisplayWidth(display,(specstruct)->screen);\
- (specstruct)->height=DisplayHeight(display,(specstruct)->screen);\
- (specstruct)->root=RootWindow(display,(specstruct)->screen);\
- (specstruct)->visual=DefaultVisual(display,(specstruct)->screen);\
- (specstruct)->gc=DefaultGC(display,(specstruct)->screen);\
- (specstruct)->depth=DefaultDepth(display,(specstruct)->screen);\
- (specstruct)->bpixel=XBlackPixel(display,(specstruct)->screen);\
- (specstruct)->wpixel=XWhitePixel(display,(specstruct)->screen);\
-}
-
-
int main(int argc,char **argv){
ProgData pdata;
@@ -73,7 +60,18 @@ int main(int argc,char **argv){
JackData jdata;
pdata.jdata=&jdata;
#endif
- QUERY_DISPLAY_SPECS(pdata.dpy,&pdata.specs);
+
+ // Query display specs
+ pdata.specs.screen = DefaultScreen(pdata.dpy);
+ pdata.specs.width = DisplayWidth(pdata.dpy, pdata.specs.screen);
+ pdata.specs.height = DisplayHeight(pdata.dpy, pdata.specs.screen);
+ pdata.specs.root = RootWindow(pdata.dpy, pdata.specs.screen);
+ pdata.specs.visual = DefaultVisual(pdata.dpy, pdata.specs.screen);
+ pdata.specs.gc = DefaultGC(pdata.dpy, pdata.specs.screen);
+ pdata.specs.depth = DefaultDepth(pdata.dpy, pdata.specs.screen);
+ pdata.specs.bpixel = XBlackPixel(pdata.dpy, pdata.specs.screen);
+ pdata.specs.wpixel = XWhitePixel(pdata.dpy, pdata.specs.screen);
+
if((pdata.specs.depth!=32)&&
(pdata.specs.depth!=24)&&
(pdata.specs.depth!=16)){
© All Rights Reserved