Welcome to Wayland. Martin Gra ßlin BlueSystems Akademy 2015

Similar documents
CS 106 Winter 2016 Craig S. Kaplan. Module 01 Processing Recap. Topics

Chapter 5 Proposed models for reconstituting/ adapting three stereoscopes

Preamble. Singly linked lists. Collaboration policy and academic integrity. Getting help

Here are a couple of warnings to my students who may be here to get a copy of what happened on a day that you missed.

We are the 1 % Porting KWin to Qt 5 Martin Gräßlin Bilbao Akademy

Politehnica University of Timisoara Mobile Computing, Sensors Network and Embedded Systems Laboratory. Testing Techniques

Message Transport With The User Datagram Protocol

The Wayland Display Server

Chapter 9 Memory Management

An In Depth Look at VOLK

You Can Do That. Unit 16. Motivation. Computer Organization. Computer Organization Design of a Simple Processor. Now that you have some understanding

Computer Organization

Recitation Caches and Blocking. 4 March 2019

CS269I: Incentives in Computer Science Lecture #8: Incentives in BGP Routing

CordEx. >> Operating instructions. English

Feature Extraction and Rule Classification Algorithm of Digital Mammography based on Rough Set Theory

Rough Set Approach for Classification of Breast Cancer Mammogram Images

Problem Paper Atoms Tree. atoms.pas. atoms.cpp. atoms.c. atoms.java. Time limit per test 1 second 1 second 2 seconds. Number of tests

Plane Sweep Algorithms

CMSC 430 Introduction to Compilers. Spring Register Allocation

A Plane Tracker for AEC-automation Applications

QtWayland. Creating Window Compositors with the QtWayland module

Video-based Characters Creating New Human Performances from a Multi-view Video Database

KWin went XCB. Blue Systems. October X.Org Developer s Conference

Almost Disjunct Codes in Large Scale Multihop Wireless Network Media Access Control

ACE: And/Or-parallel Copying-based Execution of Logic Programs

EFL on Wayland. Rafael Antognolli October, 22th

Compiler Optimisation

Overview Capturing Still Images Recording Videos Various Features Advanced Features

Dense Disparity Estimation in Ego-motion Reduced Search Space

Comparison of Methods for Increasing the Performance of a DUA Computation

Estimating Velocity Fields on a Freeway from Low Resolution Video

Boxes, Inkwells, Speech and Formulas DRAFT

Lab work #8. Congestion control

Animated Surface Pasting

CMS evolution on data access: xrootd remote access and data federation. Giacinto DONVITO INFN-BARI

Shift-map Image Registration

EXPLANATION OF THE ALGORITHMS FOR DISPLAYING 3D FIGURES ON THE COMPUTER SCREEN

UI, Graphics & EFL. Carsten Haitzler Principal Engineer Samsung Electronics Korea Founder/Leader Enlightenment / EFL

Proving Vizing s Theorem with Rodin

Data Management About Data Folder Accessing Files Managing Memory Cards

ANALYTICAL OPTIMIZATION OF SIMPLE ROOF SHADING DEVICES. Khaled Nassar 1 and Mohamed Aly 1. line below should be left

EFFICIENT STEREO MATCHING BASED ON A NEW CONFIDENCE METRIC. Won-Hee Lee, Yumi Kim, and Jong Beom Ra

Online Appendix to: Generalizing Database Forensics

ELECTRONIC SCALE WB-380. Instruction manual

Intensive Hypercube Communication: Prearranged Communication in Link-Bound Machines 1 2

Multimodal Stereo Image Registration for Pedestrian Detection

Design of Controller for Crawling to Sitting Behavior of Infants

Handling missing values in kernel methods with application to microbiology data

Learning Polynomial Functions. by Feature Construction

How to Link your Accounts at Morgan Stanley

MODULE II. Network Programming And Applications

Coupling the User Interfaces of a Multiuser Program

4.2 Implicit Differentiation

Wayland IVI Extension

Finite Automata Implementations Considering CPU Cache J. Holub

Additional Divide and Conquer Algorithms. Skipping from chapter 4: Quicksort Binary Search Binary Tree Traversal Matrix Multiplication

Classifying Facial Expression with Radial Basis Function Networks, using Gradient Descent and K-means

Design Management Using Dynamically Defined Flows

A Neural Network Model Based on Graph Matching and Annealing :Application to Hand-Written Digits Recognition

ELECTRONIC PHYSICIAN SCALE WB-3000 INSTRUCTION MANUAL

PART 2. Organization Of An Operating System

Shift-map Image Registration

Chapter 2. Operating-System Structures

FZRTRAN Procedures and Error Handling

Analysis of Virtual Machine System Policies

Socially-optimal ISP-aware P2P Content Distribution via a Primal-Dual Approach

Backpressure-based Packet-by-Packet Adaptive Routing in Communication Networks

Workspace as a Service: an Online Working Environment for Private Cloud

Overview. Operating Systems I. Simple Memory Management. Simple Memory Management. Multiprocessing w/fixed Partitions.

A Duality Based Approach for Realtime TV-L 1 Optical Flow

Bazaar Architecture Overview Release 2.8.0dev1

Learning Subproblem Complexities in Distributed Branch and Bound

2.7 Implicit Differentiation

What s wrong with existing

Experion PKS R500 Migration Planning Guide

Overview : Computer Networking. IEEE MAC Protocol: CSMA/CA Internet mobility TCP over noisy links

BIJECTIONS FOR PLANAR MAPS WITH BOUNDARIES

The Reconstruction of Graphs. Dhananjay P. Mehendale Sir Parashurambhau College, Tilak Road, Pune , India. Abstract

Characterizing Decoding Robustness under Parametric Channel Uncertainty

The GenePattern Notebook Environment

EXTRACTION OF MAIN AND SECONDARY ROADS IN VHR IMAGES USING A HIGHER-ORDER PHASE FIELD MODEL

Contributing to Safety and Due Diligence in Safety-critical Interactive Systems Development by Generating and Analyzing Finite State Models

Adjusted Probabilistic Packet Marking for IP Traceback

Loop Scheduling and Partitions for Hiding Memory Latencies

University of British Columbia CPSC 314 Computer Graphics May-June Tamara Munzner. Rasterization, Interpolation, Vision/Color

Just-In-Time Software Pipelining

Modifying ROC Curves to Incorporate Predicted Probabilities

Contributing to safety and due diligence in safety-critical interactive systems development

Multi-camera tracking algorithm study based on information fusion

Non-homogeneous Generalization in Privacy Preserving Data Publishing

Offloading Cellular Traffic through Opportunistic Communications: Analysis and Optimization

Solution Representation for Job Shop Scheduling Problems in Ant Colony Optimisation

Random Clustering for Multiple Sampling Units to Speed Up Run-time Sample Generation

On the Placement of Internet Taps in Wireless Neighborhood Networks

Experiences Developing a Wayland-Based Tizen IVI HMI. Ossama Othman

Transient analysis of wave propagation in 3D soil by using the scaled boundary finite element method

Computer Graphics Chapter 7 Three-Dimensional Viewing Viewing

JigCell Model Connector: building large molecular network models from components

Backpressure-based Packet-by-Packet Adaptive Routing in Communication Networks

Transcription:

Welcome to Waylan Martin Gra ßlin mgraesslin@ke.org BlueSystems Akaemy 2015 26.07.2015

Agena 1 Architecture 2 Evolution of KWin 3 The kwin Project 4 What s next? Welcome to Waylan Martin Gra ßlin

Agena 1 Architecture 2 Evolution of KWin 3 The kwin Project 4 What s next? Welcome to Waylan Martin Gra ßlin

Architecture as presente last year Welcome to Waylan Martin Gra ßlin

Current architecture Welcome to Waylan Martin Gra ßlin

Backen plugins for ifferent platforms KWin internal Platform Abstraction Create OpenGL context an surface QPainter fallback for no OpenGL Output information Input event hanling Libinput If backen oesn t provie input, libinput library is use. Welcome to Waylan Martin Gra ßlin

Available backen plugins Winowe/Neste Platforms X11 (supports OpenGL, QPainter) Waylan (supports OpenGL, QPainter) Full Platforms DRM (supports OpenGL through GBM, QPainter) fbev (supports QPainter) Anroi hwcomposer/libhybris (supports OpenGL, input) This Presentation runs on the DRM platform! Welcome to Waylan Martin Gra ßlin

Architecture summary KWin is a Waylan server KWin supports wl shell clients both OpenGL an SHM KWin supports Xwaylan base clients KWin can rener on top of DRM/KMS KWin support input through libinput Neste KWin Waylan servers on X11/Waylan for easy testing Welcome to Waylan Martin Gra ßlin

Agena 1 Architecture 2 Evolution of KWin 3 The kwin Project 4 What s next? Welcome to Waylan Martin Gra ßlin

Simplifie KWin (Core) architecture before Waylan Welcome to Waylan Martin Gra ßlin

Simplifie KWin (Core) architecture as of toay Welcome to Waylan Martin Gra ßlin

How to start KWin Welcome to Waylan Martin Gra ßlin

Starting KWin as X11 application How to start X? KWin s startup is highly X11 epenent Qt s XCB plugin requires X11 in QApplication ctor Starting Xwaylan before KWin requires a running Waylan server Waylan server requires event loop Event loop requires QApplication Xwaylan requires wl rm KWin nees to move away from xcb QPA Welcome to Waylan Martin Gra ßlin

Is QtWaylan any better? New Startup First start Waylan server Create QApplication Startup Compositor/Scene Startup Xwaylan Wait for Xwaylan being starte Continue with X specific startup coe Welcome to Waylan Martin Gra ßlin

Similar problems as xcb QPA Rountrips are evil Requires Waylan server at QApplication startup Does rountrip to server in startup (blocks gui threa) Cannot create a QThrea before creating QApplication QtWaylan ispatches events while waiting for the rountrip Welcome to Waylan Martin Gra ßlin

Still many workarouns neee Blocking OpenGL context creation // HACK: create a QWinow in a threa to force QtWaylan to create the // client buffer integration. // this performs an eglinitialize which woul block as it oes a rountrip // to the Waylan server in the main threa. // By moving into a threa we get the initialize without hitting the problem // This nees to be one before creating the Workspace as from insie // Workspace the angerous coe gets hit in the main threa QFutureWatcher<voi> *eglinitwatcher = new QFutureWatcher<voi>(this); eglinitwatcher->setfuture(qtconcurrent::run([] { QWinow w; w.setsurfacetype(qsurface::rasterglsurface); w.create(); })); Welcome to Waylan Martin Gra ßlin

More workarouns BypassWinowManagerHint neee for each Winow on X11 bool ApplicationWaylan::notify(QObject *o, QEvent *e) { if (QWinow *w = qobject_cast< QWinow* >(o)) { if (e->type() == QEvent::Show) { // on QtWaylan winows with X11BypassWinowManagerHint are not shown, // thus we nee to remove it. As the flag is interprete only before // the PlatformWinow is create we nee to estroy the winow first if (w->flags() & Qt::X11BypassWinowManagerHint) { w->setflags(w->flags() & ~Qt::X11BypassWinowManagerHint); w->estroy(); w->show(); return false; } } } return Application::notify(o, e); } Welcome to Waylan Martin Gra ßlin

Do we nee our own QPA plugin? Further issues Cannot share composite OpenGL context with QtQuick Cannot use threae QtQuick rener loop QtQuick on hwcomposer aborts Intercept all input insie KWin anyway Have coe to create X11 an Waylan winows Have coe to create OpenGL context Have coe to o low level event processing Welcome to Waylan Martin Gra ßlin

Agena 1 Architecture 2 Evolution of KWin 3 The kwin Project 4 What s next? Welcome to Waylan Martin Gra ßlin

I propose to rename kwin to kwin because it swallows all features (Kai-Uwe Broulik) Welcome to Waylan Martin Gra ßlin

Fixing the X11 security issues Generic issues on X11 KGlobalAccel is a global key logger Screen lockers are not secure (see Blog post Why screen lockers on X11 cannot be secure ) All winows can eit all attributes of winows of foreign processes Winows can place themselves Winows can bypass Winow Managers Clients can warp pointer Clients can grab foreign winow content Welcome to Waylan Martin Gra ßlin

KWin nees more knowlege about the winows More control to the compositor KGlobalAccel move into KWin Screen Locking nees to move into KWin Nees to know which winows belong to virtual keyboar Nees to know which process is esktop shell Nees to know which process is screen shot application Nees to know which process hanles power management Nees to know the session splash screen Nees to authorize processes to access special interfaces Welcome to Waylan Martin Gra ßlin

Suggestions for the problems appreciate! It s tricky Don t uplicate coe Don t har epen on specific technology Everything shoul be flexible How to hanle e.g. a shell process crash Don t harm user experience (no UAC) What about ke? Welcome to Waylan Martin Gra ßlin

Agena 1 Architecture 2 Evolution of KWin 3 The kwin Project 4 What s next? Welcome to Waylan Martin Gra ßlin

XDG Shell So far only wl shell support wl shell is rather limite We make it useable with a Qt extension No support for Weston-emo clients No support for GTK+ clients XDG Shell uner heavy evelopment Unstable protocol mechanism GTK, Qt, Weston on real systems out of sync Nee to get our (Qt, Plasma) nees into the protocol Welcome to Waylan Martin Gra ßlin

Winow Decorations Issues with Qt eco Minimize button oes nothing No visible istinction between active/inactive state Cannot configure button orer Cannot a our own buttons It s not a goo client-sie eco solution, moels server sie Possible Solution 1 Implement a better plugin base on KDecoration Maybe better Solution? Disable Qt eco at runtime Rea Qt::FramelessWinowHint in Extene surface Create server eco for all Qt Winows Welcome to Waylan Martin Gra ßlin

Improvements in KWin Lot s of features still missing Geometry hanling missing Winow types mostly missing Interaction with Plasma nees improvements Lots of small bugs here an there Winow Rules missing Please help us! Plasma on Waylan on too.ke.org Welcome to Waylan Martin Gra ßlin

KWinowSystem Moele aroun X11 Everywhere global Winow I Mixes API for own an foreign winows Platform abstraction is not a solution to support Waylan Iea Create a new API exposing a QAbstractItemMoel which can be use by Task Managers. Welcome to Waylan Martin Gra ßlin

Polish, polish, polish Please Help! Starting KWin: kwin waylan xwaylan Starting Plasma: startplasmacompositor Welcome to Waylan Martin Gra ßlin

Tuesay is Waylan Day Lab 0.5w 10:30 Waylan an Powerevil an KScreen 11:30 Waylan an Plasma 15:00 Waylan an Applications Welcome to Waylan Martin Gra ßlin

What is KWaylan Client? Qt style convenient library for Waylan Allow to use Waylan APIs in a Qt way Not a complete wrapper of Waylan yet Can integrate with QtWaylan QPA Aitional KWin/Plasma specific Waylan interfaces Doesn t that uplicate QtWaylan? QtWaylan is a QPA plugin KWaylan is an API which coul be use to write a Waylan QPA plugin KWaylan is to QtWaylan, what KWinowSystem is to xcb QPA plugin Welcome to Waylan Martin Gra ßlin

Aitional Interfaces provie by KWaylan Alreay implemente org ke kwin shaow (e.g. Plasma panel shaow) org ke kwin ile (KF5IleTime) org ke kwin fake input (keconnect) org ke plasma shell org ke plasma winow management More to come, e.g. Blur an Backgroun contrast effect Highlight Winows Present Winows Slie Winows Welcome to Waylan Martin Gra ßlin

New Repository: kwaylan-integration New in Plasma 5.4 Plugin for KWinowSystem Plugin for KIleTime Place for any framework plugin which nees to epen on KWaylan Welcome to Waylan Martin Gra ßlin

What is KWaylan Server? The other sie Qt-style API to implement a Waylan server Wrapper for the core Waylan protocols Wrapper for the KWin/Plasma specific interfaces No renering! Implements lots of generic Waylan server functionality Welcome to Waylan Martin Gra ßlin

Builing a Waylan Server with KWaylan auto isplay = new KWaylan::Server::Display(this); isplay->start(); auto compositor = isplay->createcompositor(isplay); compositor->create(); auto shell = isplay->createshell(isplay); shell->create(); isplay->createshm(); auto seat = isplay->createseat(isplay); seat->create(); isplay->createdatadevicemanager(isplay)->create(); isplay->createile(isplay)->create(); auto plasmashell = isplay->createplasmashell(isplay); plasmashell->create(); auto qtextenesurface = isplay->createqtsurfaceextension(isplay); qtextenesurface->create(); auto winowmanagement = isplay->createplasmawinowmanagement(isplay); winowmanagement->create(); auto shaowmanager = isplay->createshaowmanager(isplay); shaowmanager->create(); Welcome to Waylan Martin Gra ßlin

Interacting with the server Example for a create object connect(m_plasmashell, &PlasmaShellInterface::surfaceCreate, [this] (PlasmaShellSurfaceInterface *surface) { if (ShellClient *client = finclient(surface->surface())) { client->installplasmashellsurface(surface); } } ); Welcome to Waylan Martin Gra ßlin

Interacting with the server Example for upating information in the server voi InputReirection::processPointerMotion(const QPointF &pos, uint32_t time) { // KWin internal hanling for pointer motion remove for reaability #if HAVE_WAYLAND if (auto seat = finseat()) { seat->settimestamp(time); seat->setpointerpos(pos); } #enif } Welcome to Waylan Martin Gra ßlin

Why not QtCompositor? Comparable to Client vs QPA Our own interfaces are no fit for integration into Qt QtCompositor has not seen a release yet Focus on QtQuick useless for our nees Lot s of things which just oesn t fit our usecases Welcome to Waylan Martin Gra ßlin