Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mupdf window not resizing properly #1097

Closed
totaam opened this issue Jan 25, 2016 · 10 comments
Closed

mupdf window not resizing properly #1097

totaam opened this issue Jan 25, 2016 · 10 comments

Comments

@totaam
Copy link
Collaborator

totaam commented Jan 25, 2016

Issue migrated from trac ticket # 1097

component: client | priority: critical | resolution: fixed

2016-01-25 04:07:02: jiang.qian created the issue


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.

@totaam
Copy link
Collaborator Author

totaam commented Jan 25, 2016

2016-01-25 05:07:46: antoine changed priority from major to critical

@totaam
Copy link
Collaborator Author

totaam commented Jan 25, 2016

2016-01-25 05:07:46: antoine changed status from new to assigned

@totaam
Copy link
Collaborator Author

totaam commented Jan 25, 2016

2016-01-25 05:07:46: antoine commented


Probably caused by the changes in #990 or #907

@totaam
Copy link
Collaborator Author

totaam commented Feb 9, 2016

2016-02-09 20:07:49: jiang.qian commented


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

@totaam
Copy link
Collaborator Author

totaam commented Feb 18, 2016

2016-02-18 17:41:58: antoine changed status from assigned to new

@totaam
Copy link
Collaborator Author

totaam commented Feb 18, 2016

2016-02-18 17:41:58: antoine changed owner from antoine to jiang.qian

@totaam
Copy link
Collaborator Author

totaam commented Feb 18, 2016

2016-02-18 17:41:58: antoine commented


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)

@totaam
Copy link
Collaborator Author

totaam commented Feb 18, 2016

2016-02-18 21:17:44: jiang.qian changed status from new to closed

@totaam
Copy link
Collaborator Author

totaam commented Feb 18, 2016

2016-02-18 21:17:44: jiang.qian set resolution to fixed

@totaam
Copy link
Collaborator Author

totaam commented Feb 18, 2016

2016-02-18 21:17:44: jiang.qian commented


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!

@totaam totaam closed this as completed Feb 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant