diff options
author | mathias <mathias> | 2006-10-27 06:57:43 (GMT) |
---|---|---|
committer | mathias <mathias> | 2006-10-27 06:57:43 (GMT) |
commit | 10082d821d6691f42a8d8ad6fa2e42e5b3f44edd (patch) | |
tree | 99c94a6105cf35612307e307be343eda2aea8baf /src/FbTk/Transparent.cc | |
parent | 34b7f7ddfc3e914238fd0d30ff50c4f37c2a6dd8 (diff) | |
download | fluxbox_pavel-10082d821d6691f42a8d8ad6fa2e42e5b3f44edd.zip fluxbox_pavel-10082d821d6691f42a8d8ad6fa2e42e5b3f44edd.tar.bz2 |
cosmetic patch from slava semushin, removes whitespaces and
uses only those things from "namespace std" what we really need.
Diffstat (limited to 'src/FbTk/Transparent.cc')
-rw-r--r-- | src/FbTk/Transparent.cc | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/src/FbTk/Transparent.cc b/src/FbTk/Transparent.cc index a68b766..6563d5a 100644 --- a/src/FbTk/Transparent.cc +++ b/src/FbTk/Transparent.cc | |||
@@ -35,7 +35,13 @@ | |||
35 | 35 | ||
36 | #include <iostream> | 36 | #include <iostream> |
37 | #include <stdio.h> | 37 | #include <stdio.h> |
38 | using namespace std; | 38 | |
39 | |||
40 | #ifdef HAVE_XRENDER | ||
41 | using std::cerr; | ||
42 | using std::endl; | ||
43 | #endif // HAVE_XRENDER | ||
44 | |||
39 | 45 | ||
40 | namespace { | 46 | namespace { |
41 | #ifdef HAVE_XRENDER | 47 | #ifdef HAVE_XRENDER |
@@ -52,8 +58,8 @@ Picture createAlphaPic(Window drawable, unsigned char alpha) { | |||
52 | PictFormatDepth | PictFormatAlphaMask, | 58 | PictFormatDepth | PictFormatAlphaMask, |
53 | &pic_format, 0); | 59 | &pic_format, 0); |
54 | if (format == 0) { | 60 | if (format == 0) { |
55 | cerr<<"FbTk::Transparent: "<<_FBTK_CONSOLETEXT(Error, NoRenderFormat, | 61 | cerr<<"FbTk::Transparent: "<<_FBTK_CONSOLETEXT(Error, NoRenderFormat, |
56 | "Warning: Failed to find valid format for alpha.", | 62 | "Warning: Failed to find valid format for alpha.", |
57 | "transparency requires a pict format, can't get one...")<<endl; | 63 | "transparency requires a pict format, can't get one...")<<endl; |
58 | return 0; | 64 | return 0; |
59 | } | 65 | } |
@@ -63,7 +69,7 @@ Picture createAlphaPic(Window drawable, unsigned char alpha) { | |||
63 | 1, 1, 8); | 69 | 1, 1, 8); |
64 | if (alpha_pm == 0) { | 70 | if (alpha_pm == 0) { |
65 | cerr<<"FbTk::Transparent: "<<_FBTK_CONSOLETEXT(Error, NoRenderPixmap, | 71 | cerr<<"FbTk::Transparent: "<<_FBTK_CONSOLETEXT(Error, NoRenderPixmap, |
66 | "Warning: Failed to create alpha pixmap.", | 72 | "Warning: Failed to create alpha pixmap.", |
67 | "XCreatePixmap failed for our transparency pixmap")<<endl; | 73 | "XCreatePixmap failed for our transparency pixmap")<<endl; |
68 | return 0; | 74 | return 0; |
69 | } | 75 | } |
@@ -75,8 +81,8 @@ Picture createAlphaPic(Window drawable, unsigned char alpha) { | |||
75 | format, CPRepeat, &attr); | 81 | format, CPRepeat, &attr); |
76 | if (alpha_pic == 0) { | 82 | if (alpha_pic == 0) { |
77 | XFreePixmap(disp, alpha_pm); | 83 | XFreePixmap(disp, alpha_pm); |
78 | cerr<<"FbTk::Transparent: "<<_FBTK_CONSOLETEXT(Error, NoRenderPicture, | 84 | cerr<<"FbTk::Transparent: "<<_FBTK_CONSOLETEXT(Error, NoRenderPicture, |
79 | "Warning: Failed to create alpha picture.", | 85 | "Warning: Failed to create alpha picture.", |
80 | "XRenderCreatePicture failed")<<endl; | 86 | "XRenderCreatePicture failed")<<endl; |
81 | return 0; | 87 | return 0; |
82 | } | 88 | } |
@@ -234,15 +240,15 @@ void Transparent::setDest(Drawable dest, int screen_num) { | |||
234 | // create new dest pic if we have a valid dest drawable | 240 | // create new dest pic if we have a valid dest drawable |
235 | if (dest != 0) { | 241 | if (dest != 0) { |
236 | 242 | ||
237 | XRenderPictFormat *format = | 243 | XRenderPictFormat *format = |
238 | XRenderFindVisualFormat(disp, | 244 | XRenderFindVisualFormat(disp, |
239 | DefaultVisual(disp, screen_num)); | 245 | DefaultVisual(disp, screen_num)); |
240 | if (format == 0) { | 246 | if (format == 0) { |
241 | _FB_USES_NLS; | 247 | _FB_USES_NLS; |
242 | cerr<<"FbTk::Transparent: "; | 248 | cerr<<"FbTk::Transparent: "; |
243 | fprintf(stderr, | 249 | fprintf(stderr, |
244 | _FBTK_CONSOLETEXT(Error, NoRenderVisualFormat, | 250 | _FBTK_CONSOLETEXT(Error, NoRenderVisualFormat, |
245 | "Failed to find format for screen(%d)", | 251 | "Failed to find format for screen(%d)", |
246 | "XRenderFindVisualFormat failed... include %d for screen number"). | 252 | "XRenderFindVisualFormat failed... include %d for screen number"). |
247 | c_str(), screen_num); | 253 | c_str(), screen_num); |
248 | 254 | ||
@@ -284,8 +290,8 @@ void Transparent::setSource(Drawable source, int screen_num) { | |||
284 | if (format == 0) { | 290 | if (format == 0) { |
285 | _FB_USES_NLS; | 291 | _FB_USES_NLS; |
286 | cerr<<"FbTk::Transparent: "; | 292 | cerr<<"FbTk::Transparent: "; |
287 | fprintf(stderr, _FBTK_CONSOLETEXT(Error, NoRenderVisualFormat, | 293 | fprintf(stderr, _FBTK_CONSOLETEXT(Error, NoRenderVisualFormat, |
288 | "Failed to find format for screen(%d)", | 294 | "Failed to find format for screen(%d)", |
289 | "XRenderFindVisualFormat failed... include %d for screen number"). | 295 | "XRenderFindVisualFormat failed... include %d for screen number"). |
290 | c_str(), screen_num); | 296 | c_str(), screen_num); |
291 | cerr<<endl; | 297 | cerr<<endl; |