Get output physical size from output device
ClosedPublic

Authored by romangg on Aug 27 2019, 2:55 PM.

Details

Summary

Get the physical size directly from the always available output device
interface instead of saving an additional copy in the abstract wayland
output class.

There is some ambiguity with orientation and naming that needs to be
cleaned up when output orientation is reworked.

Test Plan

Nested Wayland, Drm, virtual backends tested.

Diff Detail

Repository
R108 KWin
Branch
outputDevicePhysicalSize
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 15699
Build 15717: arc lint + arc unit
romangg created this revision.Aug 27 2019, 2:55 PM
Restricted Application added a project: KWin. · View Herald TranscriptAug 27 2019, 2:55 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
romangg requested review of this revision.Aug 27 2019, 2:55 PM
davidedmundson accepted this revision.Aug 28 2019, 10:46 AM
This revision is now accepted and ready to land.Aug 28 2019, 10:46 AM
This revision was automatically updated to reflect the committed changes.
zzag added a subscriber: zzag.Aug 28 2019, 7:18 PM

Nested Wayland, Drm, virtual backends tested.

This change breaks nested X11 backend.

No backend specified through command line argument, trying auto resolution
Process 1847 stopped                                                                                                                                                                                                                                    
* thread #1, name = 'kwin_wayland', stop reason = signal SIGSEGV: invalid address (fault address: 0x10)                                                                                                                                                 
    frame #0: 0x00007ffff59998c8 libKF5WaylandServer.so.5`QScopedPointer<KWayland::Server::Global::Private, QScopedPointerDeleter<KWayland::Server::Global::Private> >::data(this=0x0000000000000010) const at qscopedpointer.h:140:16                  
   137                                                                                                                                                                                                                                                  
   138      T *data() const Q_DECL_NOTHROW                                                                                                                                                                                                              
   139      {                                                                                                                                                                                                                                           
-> 140          return d;                                                                                                                                                                                                                               
   141      }                                                                                                                                                                                                                                           
   142                                                                                                                                                                                                                                                  
   143      T *get() const Q_DECL_NOTHROW                                                                                                                                                                                                               
(lldb) bt                                                                                                                                                                                                                                               
* thread #1, name = 'kwin_wayland', stop reason = signal SIGSEGV: invalid address (fault address: 0x10)                                                                                                                                                 
  * frame #0: 0x00007ffff59998c8 libKF5WaylandServer.so.5`QScopedPointer<KWayland::Server::Global::Private, QScopedPointerDeleter<KWayland::Server::Global::Private> >::data(this=0x0000000000000010) const at qscopedpointer.h:140:16                  
    frame #1: 0x00007ffff59caba0 libKF5WaylandServer.so.5`KWayland::Server::OutputDeviceInterface::d_func(this=0x0000000000000000) const at outputdevice_interface.cpp:632:45                                                                           
    frame #2: 0x00007ffff59ca9da libKF5WaylandServer.so.5`KWayland::Server::OutputDeviceInterface::scaleF(this=0x0000000000000000) const at outputdevice_interface.cpp:590:5                                                                            
    frame #3: 0x00007ffff7dcc30e libkwin.so.5`KWin::AbstractWaylandOutput::scale(this=0x00005555556bed20) const at abstract_wayland_output.cpp:98:41                                                                                                    
    frame #4: 0x00007fffed74332d KWinWaylandX11Backend.so`KWin::X11WindowedOutput::init(this=0x00005555556bed20, logicalPosition=0x00007fffffffd990, pixelSize=0x00007fffffffd998) at x11windowed_output.cpp:60:64                                      
    frame #5: 0x00007fffed73c451 KWinWaylandX11Backend.so`KWin::X11WindowedBackend::createOutputs(this=0x00005555556234c0) at x11windowed_backend.cpp:157:21
    frame #6: 0x00007fffed73bd04 KWinWaylandX11Backend.so`KWin::X11WindowedBackend::init(this=0x00005555556234c0) at x11windowed_backend.cpp:95:22
    frame #7: 0x000055555556b337 kwin_wayland`KWin::ApplicationWayland::createBackend(this=0x00007fffffffdce0) at main_wayland.cpp:176:21
    frame #8: 0x000055555556b1f6 kwin_wayland`KWin::ApplicationWayland::performStartup(this=0x00007fffffffdce0) at main_wayland.cpp:163:18
    frame #9: 0x00007ffff7ca32e6 libkwin.so.5`KWin::Application::start(this=0x00007fffffffdce0) at main.cpp:156:19
    frame #10: 0x000055555556f771 kwin_wayland`main(argc=8, argv=0x00007fffffffdf48) at main_wayland.cpp:676:12
    frame #11: 0x00007ffff3df9ee3 libc.so.6`__libc_start_main + 243
    frame #12: 0x000055555556450e kwin_wayland`_start + 46
(lldb)
romangg added a comment.EditedAug 28 2019, 7:46 PM
In D23496#521380, @zzag wrote:

Nested Wayland, Drm, virtual backends tested.

This change breaks nested X11 backend.
...

Thanks for feedback, gonna check it out.

In D23496#521380, @zzag wrote:

Nested Wayland, Drm, virtual backends tested.

This change breaks nested X11 backend.
...

Thanks for feedback, gonna check it out.

Should be fixed by 836f88495bee.