tdf#161479 make presentation work on fractionally scaled display
With fractional scaling on wayland the monitor sizes here are reported effectively with the fractional scaling factor rounded up to the next integer. So: 1920 x 1080 at 125% scaling which appears like, 1536 x 864 is reported the same as 200% scaling, i.e. 960 x 540 So using these values as constraints for GDK_HINT_MAX_SIZE with gtk_window_set_geometry_hints for m_bFullscreen are too small to allow filling the screen. Seeing as this was introduced as a workaround in the first place, drop the workaround under wayland. Change-Id: I7acfc929755728bbf77731d040f1f0f66cac836c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174761 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
This commit is contained in:
parent
5a617f77ee
commit
4059c6351d
1 changed files with 19 additions and 2 deletions
|
@ -2473,8 +2473,25 @@ void GtkSalFrame::SetScreen( unsigned int nNewScreen, SetType eType, tools::Rect
|
|||
|
||||
// #i110881# for the benefit of compiz set a max size here
|
||||
// else setting to fullscreen fails for unknown reasons
|
||||
m_aMaxSize.setWidth( aNewMonitor.width );
|
||||
m_aMaxSize.setHeight( aNewMonitor.height );
|
||||
//
|
||||
// tdf#161479 With fractional scaling on wayland the monitor
|
||||
// sizes here are reported effectively with the fractional
|
||||
// scaling factor rounded up to the next integer, so,
|
||||
// 1920 x 1080 at 125% scaling which appears like,
|
||||
// 1536 x 864 is reported the same as 200% scaling, i.e.
|
||||
// 960 x 540 which causes a problem on trying to set
|
||||
// fullscreen on fractional scaling under wayland. Drop
|
||||
// this old workaround when under wayland.
|
||||
#if defined(GDK_WINDOWING_WAYLAND)
|
||||
const bool bWayland = DLSYM_GDK_IS_WAYLAND_DISPLAY(GtkSalFrame::getGdkDisplay());
|
||||
#else
|
||||
const bool bWayland = false;
|
||||
#endif
|
||||
if (!bWayland)
|
||||
{
|
||||
m_aMaxSize.setWidth( aNewMonitor.width );
|
||||
m_aMaxSize.setHeight( aNewMonitor.height );
|
||||
}
|
||||
}
|
||||
|
||||
if( pSize && eType == SetType::UnFullscreen )
|
||||
|
|
Loading…
Reference in a new issue