diff options
author | mathias <mathias> | 2005-09-03 14:44:07 (GMT) |
---|---|---|
committer | mathias <mathias> | 2005-09-03 14:44:07 (GMT) |
commit | 2b2236e97c10bf61f1ae518e5f9b951326a5fa0a (patch) | |
tree | e28fc6bae1ed73ce73ffbfbf381403e8a518deef | |
parent | 02c62d04f138bb16054d9cbbbaa801ae0aec016c (diff) | |
download | fluxbox_pavel-2b2236e97c10bf61f1ae518e5f9b951326a5fa0a.zip fluxbox_pavel-2b2236e97c10bf61f1ae518e5f9b951326a5fa0a.tar.bz2 |
texture limits were hardcoded to 3200 in TextureRender.cc .. this lead
to useless warnings on huge xinerama setups with those nifty 20' or bigger
lcds ... we use now screen dimensions to set a sane limit for textures
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | src/FbTk/TextureRender.cc | 11 |
2 files changed, 11 insertions, 4 deletions
@@ -1,5 +1,9 @@ | |||
1 | (Format: Year/Month/Day) | 1 | (Format: Year/Month/Day) |
2 | Changes for 0.9.14: | 2 | Changes for 0.9.14: |
3 | *05/09/03: | ||
4 | * Exchanged the hardcoded 3200 pixel limit for texture size to | ||
5 | a calculated value based on screen dimensions (Mathias) | ||
6 | FbTk/TextureRender.cc | ||
3 | *05/08/31: | 7 | *05/08/31: |
4 | * Added SVN Revision number output in info output (Thanks php-coder) | 8 | * Added SVN Revision number output in info output (Thanks php-coder) |
5 | nls/*/Translation.m, nls/fluxbox-nls.hh src/main.cc | 9 | nls/*/Translation.m, nls/fluxbox-nls.hh src/main.cc |
diff --git a/src/FbTk/TextureRender.cc b/src/FbTk/TextureRender.cc index 219f0f2..1b1616c 100644 --- a/src/FbTk/TextureRender.cc +++ b/src/FbTk/TextureRender.cc | |||
@@ -62,16 +62,19 @@ TextureRender::TextureRender(ImageControl &imgctrl, | |||
62 | width(static_cast<signed>((w > 0 ? w : 1))), height(static_cast<signed>(h > 0 ? h : 1)), | 62 | width(static_cast<signed>((w > 0 ? w : 1))), height(static_cast<signed>(h > 0 ? h : 1)), |
63 | xtable(0), ytable(0) { | 63 | xtable(0), ytable(0) { |
64 | 64 | ||
65 | unsigned int texture_max_width = WidthOfScreen(ScreenOfDisplay(FbTk::App::instance()->display(), imgctrl.screenNumber())) * 2; | ||
66 | unsigned int texture_max_height = HeightOfScreen(ScreenOfDisplay(FbTk::App::instance()->display(), imgctrl.screenNumber())) * 2; | ||
67 | |||
65 | _FB_USES_NLS; | 68 | _FB_USES_NLS; |
66 | // clamp to "normal" size | 69 | // clamp to "normal" size |
67 | if (width > 3200) { | 70 | if (width > texture_max_width) { |
68 | cerr<<"TextureRender: "<<_FBTKTEXT(Error, BigWidth, "Warning! Width > 3200 setting Width = 3200", "Image width seems too big, clamping")<<endl; | 71 | cerr<<"TextureRender: "<<_FBTKTEXT(Error, BigWidth, "Warning! Width > 3200 setting Width = 3200", "Image width seems too big, clamping")<<endl; |
69 | width = 3200; | 72 | width = texture_max_width; |
70 | } | 73 | } |
71 | 74 | ||
72 | if (height > 3200) { | 75 | if (height > texture_max_height) { |
73 | cerr<<"TextureRender: "<<_FBTKTEXT(Error, BigHeight, "Warning! Height > 3200 setting Height = 3200", "Image height seems too big, clamping")<<endl; | 76 | cerr<<"TextureRender: "<<_FBTKTEXT(Error, BigHeight, "Warning! Height > 3200 setting Height = 3200", "Image height seems too big, clamping")<<endl; |
74 | height = 3200; | 77 | height = texture_max_height; |
75 | } | 78 | } |
76 | 79 | ||
77 | 80 | ||