summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2010-02-05 18:05:22 +0100
committerDaniel Friesel <derf@derf.homelinux.org>2010-02-05 18:05:22 +0100
commit29a9dd9172a6dc92c55960a9f0652660193d8914 (patch)
treec16a7a6af56b69d98f80ac95cfc243baf12ca9f8 /src
parentc21d03b1730825b6d24e93edbdf6a2a187ecd2f9 (diff)
downloadfeh-29a9dd9172a6dc92c55960a9f0652660193d8914.zip
Apply 02_changeset_r52_netwm_full_screen.patch from Debian
Diffstat (limited to 'src')
-rw-r--r--src/winwidget.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/winwidget.c b/src/winwidget.c
index e3b9d35..8525a17 100644
--- a/src/winwidget.c
+++ b/src/winwidget.c
@@ -788,6 +788,10 @@ winwidget_resize(winwidget winwid,
int w,
int h)
{
+ Window ignored_window;
+ XWindowAttributes attributes;
+ int tc_x, tc_y;
+
D_ENTER(4);
if (opt.geom_flags) {
winwid->had_resize = 1;
@@ -800,7 +804,16 @@ winwidget_resize(winwidget winwid,
winwid->w = (w > scr->width) ? scr->width : w;
winwid->h = (h > scr->height) ? scr->height : h;
}
- XResizeWindow(disp, winwid->win, winwid->w, winwid->h);
+ /* XResizeWindow(disp, winwid->win, winwid->w, winwid->h); */
+ XGetWindowAttributes(disp, winwid->win, &attributes);
+ XTranslateCoordinates(disp, winwid->win, attributes.root,
+ -attributes.border_width - attributes.x,
+ -attributes.border_width - attributes.y,
+ &tc_x, &tc_y, &ignored_window);
+ winwid->x = tc_x;
+ winwid->y = tc_y;
+ XMoveResizeWindow(disp, winwid->win, tc_x, tc_y, winwid->w, winwid->h);
+
winwid->had_resize = 1;
XFlush(disp);