Xpra: Ticket #1097: mupdf window not resizing properly

This is a continuation of bug #1092. As noted in that bug report, the newest beta version from the repository xpra_0.16.2-1_amd64.deb fixed that problem. The mupdf now responds to keyboard events.

However, the same mupdf program is still not working properly: when resizing it with +(=) or - sign, the font resizes but the window does not resize with the fonts. Compare the behavior of the same program forwarded over ssh. There, when increasing the font size by + (=) or - keyboard shortcut, the forwarded window of the application also resizes accordingly.

Mon, 25 Jan 2016 05:07:45 GMT - Antoine Martin: priority, status changed

Probably caused by the changes in #990 or #907

Tue, 09 Feb 2016 20:07:49 GMT - Jiang:

I just upgraded the 64 bit version for trusty in the beta area, 0.17.0. The bug is still there.

Thu, 18 Feb 2016 17:41:58 GMT - Antoine Martin: owner, status changed

Ran some -d x11 debug logging whilst pressing "-":

fake_key(20, True)
WindowModel.do_xpra_configure_event(<X11:ConfigureNotify \
    {'delivered_to': '0x800103', 'send_event': 0, 'height': 842, 'width': 595, \
     'window': '0x800103', 'above': 0L, 'y': 0, 'x': 0, 'serial': '0x161f', \
     'border_width': 0, 'type': 22, 'display': ':10'}>) \
    corral=0x4000ab, client=0x800103, managed=True
resize_corral_window() resize from (794, 1123) to (595, 842)
WindowModel.do_xpra_configure_event: event is on the corral window 0x4000ab, ignored

We don't get the request event, just a notify - that looks wrong.

r11986 should fix this - but I am a bit nervous about this change, it could cause regressions like resizing loops.. I don't think this sort of change should be backported to older versions. Too risky.

I did have a look at the mupdf source code and it seems reasonable though:

void winresize(pdfapp_t *app, int w, int h)
        int image_w = fz_pixmap_width(gapp.ctx, gapp.image);
        int image_h = fz_pixmap_height(gapp.ctx, gapp.image);
        XWindowChanges values;
        int mask, width, height;
        mask = CWWidth | CWHeight;
        values.width = w;
        values.height = h;
        XConfigureWindow(xdpy, xwin, mask, &values);

@jiang.qian: does this work for you? (beta 0.17.0 DEB builds posted for Ubuntu Wily / Debian Jessie - not sure which one you wanted)

Thu, 18 Feb 2016 21:17:43 GMT - Jiang: status changed; resolution set

Yes, in the latest beta for 0.17.0 it mupdf resizes properly! Thank you so much! This means there is no roadblock for me for post 0.15 updates. And audio is working more reliably. Thank you for all these works!

Sat, 23 Jan 2021 05:14:53 GMT - migration script:

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/1097