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

Libreoffice Impress slideshow doesn't fullscreen correctly #3116

Closed
AlanGriffiths opened this issue Nov 4, 2023 · 7 comments · Fixed by #3132
Closed

Libreoffice Impress slideshow doesn't fullscreen correctly #3116

AlanGriffiths opened this issue Nov 4, 2023 · 7 comments · Fixed by #3132
Assignees

Comments

@AlanGriffiths
Copy link
Collaborator

No description provided.

@AlanGriffiths AlanGriffiths changed the title Libreoffice Imress doesn't fullscreen correctly Libreoffice Imress slideshow doesn't fullscreen correctly Nov 4, 2023
@AlanGriffiths AlanGriffiths changed the title Libreoffice Imress slideshow doesn't fullscreen correctly Libreoffice Impress slideshow doesn't fullscreen correctly Nov 5, 2023
@mattkae
Copy link
Contributor

mattkae commented Nov 9, 2023

From the logs, libreoffice impress seems to be doing xdg_toplevel.set_max_size to a width and height that are slightly less than what it should be (e.g. the width and height are 800x600, but it is setting the max size to 748x548). I have no clue why just yet 😄

@AlanGriffiths
Copy link
Collaborator Author

The immediate problem isn't having a max size set, but that the client is committing buffers of the smaller size. This affects both the "presentation" window and the "presenter's view" window. Here's the first:

[2023-11-15 17:53:53.427080] <information> miral::Window Management: place_new_window app_info={application=, windows={Miriway - bringing Wayland to your desktop.odp - LibreOffice Impress}}, requested_specification={name=Presenting: Miriway - bringing Wayland to your desktop, type=freestyle, top_left=0, 0, size=(1920, 1600), output_id=2, state=fullscreen} -> {name=Presenting: Miriway - bringing Wayland to your desktop, type=freestyle, top_left=0, 0, size=(1920, 1600), output_id=2, state=fullscreen}
[2023-11-15 17:53:53.427187] <information> miral::Window Management: advise_new_window window_info={name=Presenting: Miriway - bringing Wayland to your desktop, type=freestyle, state=fullscreen, top_left=0, 0, size=(1920, 1600), restore_rect=(480, 400, (960, 800)), children={}, exclusive_rect=0, preferred_orientation=0xf, confine_pointer=0, output_id=2}
[2023-11-15 17:53:53.427282] <information> miral::Window Management: handle_modify_window window_info={name=Presenting: Miriway - bringing Wayland to your desktop, type=freestyle, state=fullscreen, top_left=0, 0, size=(1920, 1600), restore_rect=(480, 400, (960, 800)), children={}, exclusive_rect=0, preferred_orientation=0xf, confine_pointer=0, output_id=2}, modifications={}
[2023-11-15 17:53:53.427299] <information> miral::Window Management: modify_window window_info={name=Presenting: Miriway - bringing Wayland to your desktop, type=freestyle, state=fullscreen, top_left=0, 0, size=(1920, 1600), restore_rect=(480, 400, (960, 800)), children={}, exclusive_rect=0, preferred_orientation=0xf, confine_pointer=0, output_id=2}, modifications={}
[2023-11-15 17:53:53.449919] <information> miral::Window Management: handle_modify_window window_info={name=Presenting: Miriway - bringing Wayland to your desktop, type=freestyle, state=fullscreen, top_left=0, 0, size=(1920, 1600), restore_rect=(480, 400, (960, 800)), children={}, exclusive_rect=0, preferred_orientation=0xf, confine_pointer=0, output_id=2}, modifications={size=(1868, 1548), min_width=1, min_height=1, max_width=1920, max_height=1600}

@AlanGriffiths
Copy link
Collaborator Author

This is weird:

[ 516176.499] [email protected](1268, 994, array[4])
[ 516176.538] [email protected](382)
[ 516176.546]  -> [email protected]_buffer_scale(1)
[ 516176.559]  -> [email protected]_configure(382)
[ 516176.567] [email protected](wl_output@10)
[ 516177.978]  -> [email protected]_min_size(0, 0)
[ 516178.001]  -> [email protected]_max_size(1216, 942)
[ 516178.060]  -> [email protected]_buffer_scale(1)
[ 516178.213]  -> [email protected]_buffer(new id wl_buffer@50, 0, 1216, 942, 4864, 0)
[ 516185.482]  -> [email protected](wl_buffer@50, 0, 0)
[ 516185.531]  -> [email protected]_buffer_scale(1)
[ 516185.539]  -> [email protected](0, 0, 1216, 942)
[ 516185.561]  -> [email protected]_min_size(1, 1)
[ 516185.574]  -> [email protected]_max_size(1268, 994)
[ 516185.586]  -> [email protected]_window_geometry(0, 0, 1216, 942)
[ 516185.638]  -> [email protected]_opaque_region(wl_region@51)
[ 516185.683]  -> [email protected]_input_region(wl_region@52)
[ 516185.712]  -> [email protected](new id wl_callback@53)
[ 516185.723]  -> [email protected]()

We set the size to fullscreen: [email protected](1268, 994, array[4]) and...
...the response is to send a buffer of smaller size: [email protected]_buffer(new id wl_buffer@50, 0, 1216, 942, 4864, 0)

Where is the logic in that?!

@AlanGriffiths
Copy link
Collaborator Author

For contrast, glmark2-wayland submits buffers of the expected size:

[1862284.266]  -> [email protected]_surface(new id wl_surface@16)
[1862284.297]  -> [email protected]_xdg_surface(new id xdg_surface@17, wl_surface@16)
[1862284.310]  -> [email protected]_toplevel(new id xdg_toplevel@18)
[1862284.319]  -> [email protected]_app_id("com.github.glmark2.glmark2")
[1862284.326]  -> [email protected]_title("glmark2")
[1862284.333]  -> [email protected]_fullscreen(wl_output@10)
[1862284.340]  -> [email protected]()
[1862284.661] [email protected](0, 0, array[0])
[1862284.679] [email protected](938)
[1862284.687]  -> [email protected]_configure(938)
[1862284.695] [email protected](0, 0, array[0])
[1862284.728] [email protected](939)
[1862284.735]  -> [email protected]_configure(939)
[1862284.742] [email protected](1280, 1024, array[4])
[1862284.758] [email protected](940)
[1862284.764]  -> [email protected]_configure(940)
[1862284.810]  -> [email protected]_opaque_region(wl_region@19)
[1862312.189]  -> [email protected]_immed(new id wl_buffer@21, 1280, 1024, 875713089, 0)

@AlanGriffiths
Copy link
Collaborator Author

Here's what happens with Mutter:

[2547482.532] [email protected](1920, 1600, array[4])                 <=== first configure to fullscreen 
[2547482.544] [email protected](19)
[2547482.579]  -> [email protected]_buffer_scale(1)
[2547482.595]  -> [email protected]_configure(19)
[2547483.049]  -> [email protected]_min_size(0, 0)
[2547483.062]  -> [email protected]_max_size(1868, 1548)
[2547483.074]  -> [email protected]_buffer_scale(1)
[2547483.149]  -> [email protected]_buffer(new id wl_buffer@60, 0, 1868, 1548, 7472, 0)  <== not the right size
[2547493.766]  -> [email protected](wl_buffer@60, 0, 0)
[2547493.796]  -> [email protected]_buffer_scale(1)
[2547493.802]  -> [email protected](0, 0, 1868, 1548)
[2547493.818]  -> [email protected]_min_size(1, 1)
[2547493.826]  -> [email protected]_max_size(1920, 1600)
[2547493.834]  -> [email protected]_window_geometry(0, 0, 1868, 1548)
[2547493.871]  -> [email protected]_opaque_region(wl_region@62)
[2547493.901]  -> [email protected]_input_region(wl_region@63)
[2547493.927]  -> [email protected](new id wl_callback@64)
[2547493.934]  -> [email protected]()
[2547540.415] [email protected]()
[2547540.430] [email protected](1920, 1600, array[4])                 <=== second configure to fullscreen 
[2547540.442] [email protected](20)
[2547540.453]  -> [email protected]()
[2547540.982]  -> [email protected]_buffer_scale(1)
[2547541.000]  -> [email protected]_configure(20)
[2547541.016] [email protected](1920, 1600, array[4])                 <=== third configure to fullscreen 
[2547541.027] [email protected](21)
[2547541.032]  -> [email protected]_configure(21)
[2547541.080] [email protected](1920, 1600, array[8])                 <=== fourth configure to fullscreen 
[2547541.091] [email protected](23)
[2547541.097]  -> [email protected]_configure(23)
[2547541.149] [email protected](113, wl_surface@39, array[0])
[2547541.167] [email protected](wl_surface@39)
[2547541.172] [email protected](wl_output@8)
[2547543.155]  -> [email protected]_buffer(new id wl_buffer@63, 0, 1920, 1600, 7680, 0)   <== finally the right size
[2547553.646]  -> [email protected](wl_buffer@63, 0, 0)
[2547553.693]  -> [email protected]_buffer_scale(1)
[2547553.701]  -> [email protected](0, 0, 1920, 1600)
[2547553.722]  -> [email protected]_min_size(1, 1)
[2547553.733]  -> [email protected]_max_size(1920, 1600)
[2547553.745]  -> [email protected]_window_geometry(0, 0, 1920, 1600)
[2547553.797]  -> [email protected]_input_region(wl_region@62)
[2547553.830]  -> [email protected](new id wl_callback@52)
[2547553.841]  -> [email protected]()
[2547628.737] [email protected]()

@AlanGriffiths
Copy link
Collaborator Author

Now, I remember changing some logic that repeatedly sent configure events when buffers were an unexpected size because it caused "ping pong" with apps that tried to resize. But, in this case, persisting seems to be what works.

@AlanGriffiths
Copy link
Collaborator Author

And, indeed, reverting #3042 does "fix" this problem

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

Successfully merging a pull request may close this issue.

2 participants