diff options
author | maniac <maniac@d7aaf104-2d23-0410-ae22-9d23157bf5a3> | 2007-02-13 09:05:22 +0000 |
---|---|---|
committer | maniac <maniac@d7aaf104-2d23-0410-ae22-9d23157bf5a3> | 2007-02-13 09:05:22 +0000 |
commit | a47df6754a3cb37ab8151d839821697f50861d28 (patch) | |
tree | a4ab8c669d6bc5c0f70320aa5203fdc2d3426544 | |
parent | de89650b0863c582d1e9b9ace4ee5cf1bc2af576 (diff) | |
download | marex-dev-a47df6754a3cb37ab8151d839821697f50861d28.tar.gz marex-dev-a47df6754a3cb37ab8151d839821697f50861d28.tar.bz2 |
resize plugin: properly reflect resize increment hint (closes #1341)
git-svn-id: file:///beryl/trunk@4016 d7aaf104-2d23-0410-ae22-9d23157bf5a3
-rw-r--r-- | beryl-plugins/src/resize.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/beryl-plugins/src/resize.c b/beryl-plugins/src/resize.c index 57824bf..e38e1de 100644 --- a/beryl-plugins/src/resize.c +++ b/beryl-plugins/src/resize.c @@ -325,6 +325,18 @@ static void resizeUpdateWindowSize(CompDisplay * d, int dx, int dy) if (!rd->w) return; + /* reflect resize increment hint properly - do not resize if + the resize amout isn't a multiple of this */ + if (rd->w->sizeHints.flags & PResizeInc) { + if ((dx % rd->w->sizeHints.width_inc) != 0) + dx = 0; + if ((dy % rd->w->sizeHints.height_inc) != 0) + dy = 0; + + if (!dx && !dy) + return; + } + if (rd->resizeMode != ResizeModeNormal) damageScreen(rd->w->screen); |