From 2b2236e97c10bf61f1ae518e5f9b951326a5fa0a Mon Sep 17 00:00:00 2001 From: mathias Date: Sat, 3 Sep 2005 14:44:07 +0000 Subject: 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 --- ChangeLog | 4 ++++ src/FbTk/TextureRender.cc | 11 +++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index bdaf008..4934fa8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ (Format: Year/Month/Day) Changes for 0.9.14: +*05/09/03: + * Exchanged the hardcoded 3200 pixel limit for texture size to + a calculated value based on screen dimensions (Mathias) + FbTk/TextureRender.cc *05/08/31: * Added SVN Revision number output in info output (Thanks php-coder) 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, width(static_cast((w > 0 ? w : 1))), height(static_cast(h > 0 ? h : 1)), xtable(0), ytable(0) { + unsigned int texture_max_width = WidthOfScreen(ScreenOfDisplay(FbTk::App::instance()->display(), imgctrl.screenNumber())) * 2; + unsigned int texture_max_height = HeightOfScreen(ScreenOfDisplay(FbTk::App::instance()->display(), imgctrl.screenNumber())) * 2; + _FB_USES_NLS; // clamp to "normal" size - if (width > 3200) { + if (width > texture_max_width) { cerr<<"TextureRender: "<<_FBTKTEXT(Error, BigWidth, "Warning! Width > 3200 setting Width = 3200", "Image width seems too big, clamping")< 3200) { + if (height > texture_max_height) { cerr<<"TextureRender: "<<_FBTKTEXT(Error, BigHeight, "Warning! Height > 3200 setting Height = 3200", "Image height seems too big, clamping")<