D24826: Enforce 100 chars line width

2020-09-24 Thread Roman Gilg
romangg abandoned this revision.

REPOSITORY
  R240 Extra CMake Modules

REVISION DETAIL
  https://phabricator.kde.org/D24826

To: romangg, #frameworks, cullmann
Cc: carewolf, winterz, zzag, kde-frameworks-devel, kde-buildsystem, LeGast00n, 
cblack, bencreasy, michaelh, ngraham, bruns


D24826: Enforce 100 chars line width

2020-09-24 Thread Roman Gilg
romangg added a comment.


  FYI I'm using a strict 100 chars limit nowadays on all my KWinFT projects 
(with the exception of KWinFT itself for now) and I'm very happy with this 
decision.
  
  As an example you can compare these two otherwise still pretty similar files:
  https://invent.kde.org/plasma/libkscreen/-/blob/master/src/backendmanager.cpp
  https://gitlab.com/kwinft/disman/-/blob/master/lib/backendmanager.cpp
  
  I don't even think about any of this anymore, especially I don't care if 
clang-format moves a function name or puts a bracket here or there. I just 
apply clang-format to the file and that's it. The consistency trumps anything 
else.
  
  Anyway closing this diff as requested.

REPOSITORY
  R240 Extra CMake Modules

REVISION DETAIL
  https://phabricator.kde.org/D24826

To: romangg, #frameworks, cullmann
Cc: carewolf, winterz, zzag, kde-frameworks-devel, kde-buildsystem, LeGast00n, 
cblack, bencreasy, michaelh, ngraham, bruns


Re: Recent breakage in kwallet

2020-05-15 Thread Roman Gilg
On Fri, May 15, 2020 at 3:53 PM Roman Gilg  wrote:
>
> On Fri, May 15, 2020 at 12:44 PM Marco Martin  wrote:
> >
> > Hi all,
> > Recently, the package of KWallet framework for neon (devel unstable,
> > package built out of current master state) seems to be broken: kwallet
> > now can't open anymore wallets previously created (it works if the
> > local kwallet data is deleted and recreated)
> > the weird thing is that it seems that with a manual build it works instead.
>
> I build it manually and it's broken there too.
>
> > The only kinda suspicious commit is
> > 850219f83e7d746 fix compilation with -Werror=undef
> > which seems to fix.. big endian for everyone?
> > still no idea why is broken only the distro-built package
> >
> > --
> > Marco Martin
>
> Just in case you're on Neon Dev Unstable: I just realized that on one
> of the last updates the whole plasma-desktop and plasma-workspace
> packages were uninstalled from my machine and now they can't be
> installed anymore because of some conflict with libksysguard.
>
> I didn't notice it at first because I have a self-compiled version but
> it would be not far fetched that even a separate compilation of
> KWallet breaks in some ways when the Plasma installation in /usr is
> ripped out, especially when only a subset of KDE packages is compiled.
> So my plan at the moment is to wait until I can install Plasma back
> into /usr and then try again.

Package plasma-desktop can be installed again, so I did. But problem
with KWallet sadly persists.


Re: Recent breakage in kwallet

2020-05-15 Thread Roman Gilg
On Fri, May 15, 2020 at 12:44 PM Marco Martin  wrote:
>
> Hi all,
> Recently, the package of KWallet framework for neon (devel unstable,
> package built out of current master state) seems to be broken: kwallet
> now can't open anymore wallets previously created (it works if the
> local kwallet data is deleted and recreated)
> the weird thing is that it seems that with a manual build it works instead.

I build it manually and it's broken there too.

> The only kinda suspicious commit is
> 850219f83e7d746 fix compilation with -Werror=undef
> which seems to fix.. big endian for everyone?
> still no idea why is broken only the distro-built package
>
> --
> Marco Martin

Just in case you're on Neon Dev Unstable: I just realized that on one
of the last updates the whole plasma-desktop and plasma-workspace
packages were uninstalled from my machine and now they can't be
installed anymore because of some conflict with libksysguard.

I didn't notice it at first because I have a self-compiled version but
it would be not far fetched that even a separate compilation of
KWallet breaks in some ways when the Plasma installation in /usr is
ripped out, especially when only a subset of KDE packages is compiled.
So my plan at the moment is to wait until I can install Plasma back
into /usr and then try again.


D29231: [WIP] Add keyboard_shortcuts_inhibit protocol

2020-04-27 Thread Roman Gilg
romangg added inline comments.

INLINE COMMENTS

> zzag wrote in keyboard_shortcuts_inhibit_interface.cpp:129
> We probably need to ask folks in `#wayland` whether inhibitors outlive the 
> manager object.

In general objects created through some interface can outlive the interface 
bind if not otherwise specified in the protocol definition. I.e. the todo can 
be removed.

REPOSITORY
  R127 KWayland

REVISION DETAIL
  https://phabricator.kde.org/D29231

To: bport, zzag, davidedmundson, apol
Cc: romangg, crossi, kde-frameworks-devel, LeGast00n, cblack, michaelh, 
ngraham, bruns


D28882: Create protocol to manage video feeds

2020-04-17 Thread Roman Gilg
romangg added inline comments.

INLINE COMMENTS

> screencast.xml:8
> +  ]]>
> +
> +

Interface names should be scoped too. Example 
.

Don't ask me why exactly why. I think it has something to do with the C structs 
becoming ambiguous otherwise. Someone else knows?

But in any case I would follow the examples set by upstream.

REPOSITORY
  R127 KWayland

REVISION DETAIL
  https://phabricator.kde.org/D28882

To: apol, #kwin, jgrulich
Cc: romangg, zzag, kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, 
bruns


D28620: Add readmes clarifying state of plasma component versions

2020-04-06 Thread Roman Gilg
romangg accepted this revision.
romangg added a comment.


  If you want to you can also add a ⚠️ (`:warning:`) emoticon to the deprecated 
text and in both some headings with `#`, `##`, etc.

REPOSITORY
  R242 Plasma Framework (Library)

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D28620

To: davidedmundson, #plasma, apol, romangg
Cc: romangg, apol, kde-frameworks-devel, LeGast00n, cblack, GB_2, michaelh, 
ngraham, bruns


D28620: Add readmes clarifying state of plasma component versions

2020-04-06 Thread Roman Gilg
romangg added a comment.


  README.md is common for viewing in modern code hosting solutions with 
markdown support.

REPOSITORY
  R242 Plasma Framework (Library)

BRANCH
  origin-master (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D28620

To: davidedmundson, #plasma, apol
Cc: romangg, apol, kde-frameworks-devel, LeGast00n, cblack, GB_2, michaelh, 
ngraham, bruns


D26308: Set output device's logical size

2020-01-09 Thread Roman Gilg
romangg added a task: T11222: Reimagine output cloning.

REPOSITORY
  R127 KWayland

REVISION DETAIL
  https://phabricator.kde.org/D26308

To: romangg, #kwin, davidedmundson
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D26308: Set output device's logical size

2020-01-06 Thread Roman Gilg
romangg removed a dependent revision: D26309: feat: replace replication source 
with logical size API.

REPOSITORY
  R127 KWayland

REVISION DETAIL
  https://phabricator.kde.org/D26308

To: romangg, #kwin, davidedmundson
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D26308: Set output device's logical size

2020-01-02 Thread Roman Gilg
romangg updated this revision to Diff 72615.
romangg marked 4 inline comments as done.
romangg added a comment.


  - Add autotest
  - Cleanup

REPOSITORY
  R127 KWayland

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D26308?vs=72427=72615

BRANCH
  replicaSize

REVISION DETAIL
  https://phabricator.kde.org/D26308

AFFECTED FILES
  autotests/client/test_wayland_outputdevice.cpp
  src/client/outputconfiguration.cpp
  src/client/outputconfiguration.h
  src/client/outputdevice.cpp
  src/client/outputdevice.h
  src/client/protocols/output-management.xml
  src/client/protocols/outputdevice.xml
  src/client/registry.cpp
  src/server/outputchangeset.cpp
  src/server/outputchangeset.h
  src/server/outputchangeset_p.h
  src/server/outputconfiguration_interface.cpp
  src/server/outputdevice_interface.cpp
  src/server/outputdevice_interface.h
  src/server/outputmanagement_interface.cpp

To: romangg, #kwin, davidedmundson
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D26171: Implement wp_viewporter

2020-01-01 Thread Roman Gilg
romangg updated this revision to Diff 72576.
romangg added a comment.


  - Cleanup

REPOSITORY
  R127 KWayland

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D26171?vs=72575=72576

BRANCH
  viewporter

REVISION DETAIL
  https://phabricator.kde.org/D26171

AFFECTED FILES
  autotests/client/CMakeLists.txt
  autotests/client/test_viewporter.cpp
  src/client/CMakeLists.txt
  src/client/registry.cpp
  src/client/registry.h
  src/client/viewporter.cpp
  src/client/viewporter.h
  src/server/CMakeLists.txt
  src/server/display.cpp
  src/server/display.h
  src/server/surface_interface.cpp
  src/server/surface_interface.h
  src/server/surface_interface_p.h
  src/server/viewporter_interface.cpp
  src/server/viewporter_interface.h

To: romangg, #kwin
Cc: davidedmundson, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, 
bruns


D26171: Implement wp_viewporter

2020-01-01 Thread Roman Gilg
romangg updated this revision to Diff 72575.
romangg marked 6 inline comments as done.
romangg added a comment.


  - Check source rectangle on related changes, buffer rename.

REPOSITORY
  R127 KWayland

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D26171?vs=72029=72575

BRANCH
  viewporter

REVISION DETAIL
  https://phabricator.kde.org/D26171

AFFECTED FILES
  autotests/client/CMakeLists.txt
  autotests/client/test_viewporter.cpp
  src/client/CMakeLists.txt
  src/client/registry.cpp
  src/client/registry.h
  src/client/viewporter.cpp
  src/client/viewporter.h
  src/server/CMakeLists.txt
  src/server/display.cpp
  src/server/display.h
  src/server/surface_interface.cpp
  src/server/surface_interface.h
  src/server/surface_interface_p.h
  src/server/viewporter_interface.cpp
  src/server/viewporter_interface.h

To: romangg, #kwin
Cc: davidedmundson, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, 
bruns


D26308: Set output device's logical size

2019-12-30 Thread Roman Gilg
romangg added a dependent revision: D26311: Handle output logical size changes.

REPOSITORY
  R127 KWayland

REVISION DETAIL
  https://phabricator.kde.org/D26308

To: romangg, #kwin, davidedmundson
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D26308: Set output device's logical size

2019-12-30 Thread Roman Gilg
romangg added a dependent revision: D26309: feat: replace replication source 
with logical size API.

REPOSITORY
  R127 KWayland

REVISION DETAIL
  https://phabricator.kde.org/D26308

To: romangg, #kwin, davidedmundson
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D26308: Set output device's logical size

2019-12-30 Thread Roman Gilg
romangg added a comment.


  I thought about adding separate events/requests for an 
immutable`logical_size` just giving always back the current logical size of the 
output and `logical_size_override` always giving back the explicitly set 
logical size or an invalid size if none is set.

REPOSITORY
  R127 KWayland

REVISION DETAIL
  https://phabricator.kde.org/D26308

To: romangg, #kwin, davidedmundson
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D26308: Set output device's logical size

2019-12-30 Thread Roman Gilg
romangg added a comment.


  This is an alternative to D23619  with 
more patches to come as discussed with David back then.

INLINE COMMENTS

> outputdevice.h:98
>  };
> +
>  struct Mode {

rm

> outputdevice.xml:293
> +
> +
> +Returns the logical size in compositor space. This event is 
> always sent after

fix summary

> outputdevice.xml:296
> +the logical size is changed and can be triggered by explicit 
> logical size changes
> +in the configruation interface or implicitly through a scale or 
> mode change.
> +

spelling

> outputdevice_interface.h:86
>  };
> +
>  enum class ModeFlag {

rm

REPOSITORY
  R127 KWayland

REVISION DETAIL
  https://phabricator.kde.org/D26308

To: romangg, #kwin, davidedmundson
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D26308: Set output device's logical size

2019-12-30 Thread Roman Gilg
romangg created this revision.
romangg added reviewers: KWin, davidedmundson.
Herald added a project: Frameworks.
Herald added a subscriber: kde-frameworks-devel.
romangg requested review of this revision.

REVISION SUMMARY
  This adds protocol methods and API to query and set explicitly the logical 
size
  of an output where the logical size is defined as the internal representation
  of this output in the compositor space.

TEST PLAN
  Tested with output replications through KScreen.

REPOSITORY
  R127 KWayland

BRANCH
  replicaSize

REVISION DETAIL
  https://phabricator.kde.org/D26308

AFFECTED FILES
  src/client/outputconfiguration.cpp
  src/client/outputconfiguration.h
  src/client/outputdevice.cpp
  src/client/outputdevice.h
  src/client/protocols/output-management.xml
  src/client/protocols/outputdevice.xml
  src/client/registry.cpp
  src/server/outputchangeset.cpp
  src/server/outputchangeset.h
  src/server/outputchangeset_p.h
  src/server/outputconfiguration_interface.cpp
  src/server/outputdevice_interface.cpp
  src/server/outputdevice_interface.h
  src/server/outputmanagement_interface.cpp

To: romangg, #kwin, davidedmundson
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D26175: [plasmashell] Update docs for panelTakesFocus to make it generic

2019-12-23 Thread Roman Gilg
romangg accepted this revision.
romangg added inline comments.
This revision is now accepted and ready to land.

INLINE COMMENTS

> apol wrote in plasmashell_interface.h:178
> How about we rename now and deprecate this one?

Yea, could be better. David should decide on what he prefers. But the renaming 
should then anyway go into a separate patch.

REPOSITORY
  R127 KWayland

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D26175

To: davidedmundson, #kwin, romangg
Cc: romangg, apol, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, 
bruns


D26171: Implement wp_viewporter

2019-12-23 Thread Roman Gilg
romangg added inline comments.

INLINE COMMENTS

> davidedmundson wrote in surface_interface.cpp:485
> We're not testing this error in the case of:
> 
> buffer is set
> viewporter.sourceRect is set
> 
> then later
> buffer changes
> viewporter.sourceRect remains the same
> 
> this should be an error too.

Good point. Same should be done for when the transform or scale changes.

> davidedmundson wrote in surface_interface.cpp:882
> Should this be
> 
> d->current.sourceRectangle.size()/ scale()
> 
> It would be a somewhat weird case to use both viewporter and wl_buffer.scale, 
> but it's what the spec implies and you seem to be assuming that in the kwin 
> render path.
> 
> destinationSize would be as-is.

How I read the spec: the source rectangle is always specified in coordinates 
after scale and transform. [1]

`SurfaceInterface::size()` returns the scaled and transformed (not yet) buffer 
size so since viewporter coordinates are to this base we can just directly 
return them.

[1] 
https://gitlab.freedesktop.org/wayland/wayland-protocols/blob/master/stable/viewporter/viewporter.xml#L103

> davidedmundson wrote in surface_interface.h:130
> Why not just
> 
> BufferInterface *buffer() const
> 
> There's no reason why a caller would need to explicitly pick a const vs 
> non-const version.

Yea, I added the new function for API/ABI-compatibility. But if you say making 
the function `buffer()` const is not a problem in this regard I will gladly do 
that.

REPOSITORY
  R127 KWayland

REVISION DETAIL
  https://phabricator.kde.org/D26171

To: romangg, #kwin
Cc: davidedmundson, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, 
bruns


D26171: Implement wp_viewporter

2019-12-22 Thread Roman Gilg
romangg added a task: T4456: Implement viewporter protocol.

REPOSITORY
  R127 KWayland

REVISION DETAIL
  https://phabricator.kde.org/D26171

To: romangg, #kwin
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D26171: Implement wp_viewporter

2019-12-22 Thread Roman Gilg
romangg added inline comments.

INLINE COMMENTS

> surface_interface.h:130
> + **/
> +BufferInterface *constBuffer() const;
>  QPoint offset() const;

Needed for a call in a const function in KWin. Do we want to do it like that? 
Other suggestions?

REPOSITORY
  R127 KWayland

REVISION DETAIL
  https://phabricator.kde.org/D26171

To: romangg, #kwin
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D26171: Implement wp_viewporter

2019-12-22 Thread Roman Gilg
romangg added a dependent revision: D26172: Add wp_viewporter support.

REPOSITORY
  R127 KWayland

REVISION DETAIL
  https://phabricator.kde.org/D26171

To: romangg, #kwin
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D26171: Implement wp_viewporter

2019-12-22 Thread Roman Gilg
romangg created this revision.
romangg added a reviewer: KWin.
Herald added a project: Frameworks.
Herald added a subscriber: kde-frameworks-devel.
romangg requested review of this revision.

REVISION SUMMARY
  This patch adds interfaces for specifying viewports via the wp_viewporter
  protocol extension. This allows to make surface size and buffer independent
  from each other. For example a video player can send 1080p video data while
  the window of the player is of different size.
  
  The server interface ViewportInterface is directly integrated with
  SurfaceInterface. Viewport changes are double-buffered by that.

TEST PLAN
  Added auto tests and with weston-scaler.

REPOSITORY
  R127 KWayland

BRANCH
  viewporter

REVISION DETAIL
  https://phabricator.kde.org/D26171

AFFECTED FILES
  autotests/client/CMakeLists.txt
  autotests/client/test_viewporter.cpp
  src/client/CMakeLists.txt
  src/client/registry.cpp
  src/client/registry.h
  src/client/viewporter.cpp
  src/client/viewporter.h
  src/server/CMakeLists.txt
  src/server/display.cpp
  src/server/display.h
  src/server/surface_interface.cpp
  src/server/surface_interface.h
  src/server/surface_interface_p.h
  src/server/viewporter_interface.cpp
  src/server/viewporter_interface.h

To: romangg, #kwin
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D26153: Sync QWindow flag WindowDoesNotAcceptFocus to wayland plasmashell interface

2019-12-22 Thread Roman Gilg
romangg accepted this revision.
This revision is now accepted and ready to land.

REPOSITORY
  R242 Plasma Framework (Library)

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D26153

To: davidedmundson, #kwin, #plasma, romangg
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D25576: [server] Do not own dmabuf implementation

2019-11-27 Thread Roman Gilg
This revision was automatically updated to reflect the committed changes.
Closed by commit R127:005a8ede4bb7: [server] Do not own dmabuf implementation 
(authored by romangg).

REPOSITORY
  R127 KWayland

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D25576?vs=70457=70463

REVISION DETAIL
  https://phabricator.kde.org/D25576

AFFECTED FILES
  src/server/linuxdmabuf_v1_interface.cpp
  src/server/linuxdmabuf_v1_interface.h

To: romangg, #kwin, davidedmundson
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D25576: [server] Do not own dmabuf implementation

2019-11-27 Thread Roman Gilg
romangg added a dependent revision: D25577: Destroy dmabuf implementation on 
EGL backend going down.

REPOSITORY
  R127 KWayland

REVISION DETAIL
  https://phabricator.kde.org/D25576

To: romangg, #kwin
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D25576: [server] Do not own dmabuf implementation

2019-11-27 Thread Roman Gilg
romangg created this revision.
romangg added a reviewer: KWin.
Herald added a project: Frameworks.
Herald added a subscriber: kde-frameworks-devel.
romangg requested review of this revision.

REVISION SUMMARY
  The dmabuf implementation should be managed by the compositor and not by the
  interface which might go away through signals while the implementation goes
  away in the compositor simultaneously.

TEST PLAN
  Compiles.

REPOSITORY
  R127 KWayland

BRANCH
  dmabuf-impl-ownership

REVISION DETAIL
  https://phabricator.kde.org/D25576

AFFECTED FILES
  src/server/linuxdmabuf_v1_interface.cpp
  src/server/linuxdmabuf_v1_interface.h

To: romangg, #kwin
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D24826: Enforce 100 chars line width

2019-10-21 Thread Roman Gilg
romangg added a comment.


  In D24826#551280 , @cullmann wrote:
  
  > As explained in the thread on https://phabricator.kde.org/T11214, this will 
make the formatting ugly as hell, as if you have long method names, stuff is 
broken in arbitrary bad ways.
  >  I don't want to change that, if nobody can avoid the resulting breakage.
  
  
  Does it brutalize the line breaks always or only when the code line does not 
comply with the 100 chars limit? Or from the other side does `ColumnLimit: 240` 
mean that all "unnecessary" manual line breaks will be removed such that there 
are >200 chars lines now where before a document was only with <200? This would 
be even worse.

REPOSITORY
  R240 Extra CMake Modules

REVISION DETAIL
  https://phabricator.kde.org/D24826

To: romangg, #frameworks, cullmann
Cc: kde-frameworks-devel, kde-buildsystem, LeGast00n, GB_2, bencreasy, 
michaelh, ngraham, bruns


D24826: Enforce 100 chars line width

2019-10-21 Thread Roman Gilg
romangg created this revision.
romangg added reviewers: Frameworks, cullmann.
Herald added projects: Frameworks, Build System.
Herald added subscribers: kde-buildsystem, kde-frameworks-devel.
romangg requested review of this revision.

REVISION SUMMARY
  The KDE Frameworks style recommended a 100 chars line limit but did not 
enforce
  it. Now with the clang-format file currently a somewhat arbitrary limit of 240
  chars is enforced.
  
  Instead enforce the recommendation of 100 chars per line.

REPOSITORY
  R240 Extra CMake Modules

BRANCH
  columnLimit

REVISION DETAIL
  https://phabricator.kde.org/D24826

AFFECTED FILES
  kde-modules/clang-format.cmake

To: romangg, #frameworks, cullmann
Cc: kde-frameworks-devel, kde-buildsystem, LeGast00n, GB_2, bencreasy, 
michaelh, ngraham, bruns


D24663: Use ECMGenerateExportHeader to manage deprecated API better

2019-10-20 Thread Roman Gilg
romangg added a comment.


  It's ok that you pushed. Can you give a link to your preferred resource for 
me to read up on ECMGenerateExportHeader?

REPOSITORY
  R127 KWayland

REVISION DETAIL
  https://phabricator.kde.org/D24663

To: kossebau, #kwin
Cc: romangg, zzag, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, 
bruns


D24003: kwaylandScanner produce version enum per class

2019-09-20 Thread Roman Gilg
romangg added a comment.


  By the way I guess the reason why only the 
`PrimarySelectionOfferV1InterfaceVersion` is there without the patch is that 
the other interfaces are created through the manager on request of the client 
while the offer is created server-side and then sent through an event to client.

REPOSITORY
  R127 KWayland

REVISION DETAIL
  https://phabricator.kde.org/D24003

To: gladhorn, #kwin
Cc: romangg, zzag, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, 
bruns


D24003: kwaylandScanner produce version enum per class

2019-09-20 Thread Roman Gilg
romangg added a comment.


  Header output with the patch:
  
#ifndef KWAYLAND_SERVER_WP_PRIMARY_SELECTION_UNSTABLE_V1_H
#define KWAYLAND_SERVER_WP_PRIMARY_SELECTION_UNSTABLE_V1_H

#include "global.h"
#include "resource.h"

#include 

namespace KWayland
{
namespace Server
{

class Display;

/**
 * Enum describing the interface versions the 
PrimarySelectionDeviceManagerV1Interface can support.
 *
 * @since 5.XX
 **/
enum class PrimarySelectionDeviceManagerV1InterfaceVersion {
/**
 * zwp_primary_selection_device_manager_v1
 **/
 UnstableV1
};

/**
 * Enum describing the interface versions the 
PrimarySelectionDeviceV1Interface can support.
 *
 * @since 5.XX
 **/
enum class PrimarySelectionDeviceV1InterfaceVersion {
/**
 * zwp_primary_selection_device_v1
 **/
 UnstableV1
};

/**
 * Enum describing the interface versions the 
PrimarySelectionOfferV1Interface can support.
 *
 * @since 5.XX
 **/
enum class PrimarySelectionOfferV1InterfaceVersion {
/**
 * zwp_primary_selection_offer_v1
 **/
 UnstableV1
};

/**
 * Enum describing the interface versions the 
PrimarySelectionSourceV1Interface can support.
 *
 * @since 5.XX
 **/
enum class PrimarySelectionSourceV1InterfaceVersion {
/**
 * zwp_primary_selection_source_v1
 **/
 UnstableV1
};

class KWAYLANDSERVER_EXPORT PrimarySelectionDeviceManagerV1Interface : 
public Global
{
Q_OBJECT
public:
virtual ~PrimarySelectionDeviceManagerV1Interface();

/**
 * @returns The interface version used by this 
PrimarySelectionDeviceManagerV1Interface
 **/
PrimarySelectionDeviceManagerV1InterfaceVersion interfaceVersion() 
const;

protected:
class Private;
explicit PrimarySelectionDeviceManagerV1Interface(Private *d, QObject 
*parent = nullptr);

private:
Private *d_func() const;
};

class KWAYLANDSERVER_EXPORT PrimarySelectionDeviceV1Interface : public 
Resource
{
Q_OBJECT
public:

virtual ~PrimarySelectionDeviceV1Interface();

/**
 * @returns The interface version used by this 
PrimarySelectionDeviceV1Interface
 **/
PrimarySelectionDeviceManagerV1InterfaceVersion interfaceVersion() 
const;

protected:
class Private;
explicit PrimarySelectionDeviceV1Interface(Private *p, QObject *parent 
= nullptr);

private:
Private *d_func() const;
};

class KWAYLANDSERVER_EXPORT PrimarySelectionOfferV1Interface : public Global
{
Q_OBJECT
public:
virtual ~PrimarySelectionOfferV1Interface();

/**
 * @returns The interface version used by this 
PrimarySelectionOfferV1Interface
 **/
PrimarySelectionOfferV1InterfaceVersion interfaceVersion() const;

protected:
class Private;
explicit PrimarySelectionOfferV1Interface(Private *d, QObject *parent = 
nullptr);

private:
Private *d_func() const;
};

class KWAYLANDSERVER_EXPORT PrimarySelectionSourceV1Interface : public 
Resource
{
Q_OBJECT
public:

virtual ~PrimarySelectionSourceV1Interface();

/**
 * @returns The interface version used by this 
PrimarySelectionSourceV1Interface
 **/
PrimarySelectionDeviceManagerV1InterfaceVersion interfaceVersion() 
const;

protected:
class Private;
explicit PrimarySelectionSourceV1Interface(Private *p, QObject *parent 
= nullptr);

private:
Private *d_func() const;
};


}
}

#endif
  
  Without it just the first enum is generated.
  
  That being said only two of the four defined enums are actually used in the 
above skeleton and normally only one enum is defined which then determines all 
interfaces created by the manager. See for example:
  https://cgit.kde.org/kwayland.git/tree/src/server/textinput_interface.h
  
  Mixing different versions does not make sense so it's enough to have one enum 
for all interfaces.

REPOSITORY
  R127 KWayland

REVISION DETAIL
  https://phabricator.kde.org/D24003

To: gladhorn, #kwin
Cc: romangg, zzag, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, 
bruns


D24012: Supress mouse events in KCMs causing window moves

2019-09-19 Thread Roman Gilg
romangg added a comment.


  Forgot that KCMUtils is part of Frameworks... And probably doesn't make sense 
to create a bug fix Frameworks release just for that. The KScreen KCM is still 
usable, just moving outputs is difficult but also possible. So just push for 
next Frameworks release.

REPOSITORY
  R295 KCMUtils

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D24012

To: davidedmundson, #plasma, romangg
Cc: romangg, ngraham, anthonyfieroni, kde-frameworks-devel, LeGast00n, GB_2, 
michaelh, bruns


D24012: Supress mouse events in KCMs causing window moves

2019-09-19 Thread Roman Gilg
romangg accepted this revision.
romangg added a comment.
This revision is now accepted and ready to land.


  Let's get it in the beta. But can you reply to @anthonyfieroni inline reply 
before pushing?

REPOSITORY
  R295 KCMUtils

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D24012

To: davidedmundson, #plasma, romangg
Cc: romangg, ngraham, anthonyfieroni, kde-frameworks-devel, LeGast00n, GB_2, 
michaelh, bruns


D23915: Improve documentation

2019-09-15 Thread Roman Gilg
romangg accepted this revision.
This revision is now accepted and ready to land.

REPOSITORY
  R127 KWayland

BRANCH
  arcpatch-D23915_1

REVISION DETAIL
  https://phabricator.kde.org/D23915

To: gladhorn, #kwin, romangg
Cc: romangg, zzag, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, 
bruns


D23915: Improve documentationSome of the documentation did not say what the purpose of therespective class was, but rather gave a tautology.For people new to the code base it helps to mention thatDPMS

2019-09-14 Thread Roman Gilg
romangg requested changes to this revision.
romangg added a comment.
This revision now requires changes to proceed.


  Title of this diff must be changed before push.

REPOSITORY
  R127 KWayland

REVISION DETAIL
  https://phabricator.kde.org/D23915

To: gladhorn, #kwin, romangg
Cc: romangg, zzag, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, 
bruns


D23915: Add some docstrings

2019-09-13 Thread Roman Gilg
romangg accepted this revision.
romangg added inline comments.
This revision is now accepted and ready to land.

INLINE COMMENTS

> zzag wrote in dpms.h:44
> Not sure that this is valid documentation for org_kde_kwin_dpms_manager 
> because it's nothing more but a factory.

Yea, maybe just write that this class is meant to create the DPMS object below 
only. You already have the information you provided here there then.

> zzag wrote in dpms_interface.h:38-41
> While it's sort of true, I don't think it's valid description. The line above 
> precisely describes what DpmsManagerInterface is.

Not sure why it should not be valid. Maybe add that the code interaction 
//server-side// happens only via the OutputInterface. Because client-side in 
KWayland the respective Dpms class provides the API.

REPOSITORY
  R127 KWayland

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D23915

To: gladhorn, #kwin, romangg
Cc: romangg, zzag, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, 
bruns


D23619: Introduce cloning and replication of output devices

2019-09-02 Thread Roman Gilg
romangg added a dependent revision: D23684: WIP: Add presenting event to 
output-device protocol.

REPOSITORY
  R127 KWayland

REVISION DETAIL
  https://phabricator.kde.org/D23619

To: romangg, #kwin
Cc: kpiwowarski, zzag, kde-frameworks-devel, LeGast00n, GB_2, michaelh, 
ngraham, bruns


D23684: WIP: Add presenting event to output-device protocol

2019-09-02 Thread Roman Gilg
romangg retitled this revision from "Add presenting event to output-device 
protocol" to "WIP: Add presenting event to output-device protocol".

REPOSITORY
  R127 KWayland

REVISION DETAIL
  https://phabricator.kde.org/D23684

To: romangg, #kwin
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D23684: WIP: Add presenting event to output-device protocol

2019-09-02 Thread Roman Gilg
romangg added a dependency: D23619: Introduce cloning and replication of output 
devices.

REPOSITORY
  R127 KWayland

REVISION DETAIL
  https://phabricator.kde.org/D23684

To: romangg, #kwin
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D23684: Add presenting event to output-device protocol

2019-09-02 Thread Roman Gilg
romangg created this revision.
romangg added a reviewer: KWin.
Herald added a project: Frameworks.
Herald added a subscriber: kde-frameworks-devel.
romangg requested review of this revision.

REVISION SUMMARY
  The idea for this event is to inform output managing clients about the current
  state of the output device in regards to it being part of the overall
  compositor space and presenting content or if the output is currently not for
  some reason.
  
  This helps in presenting a managable overview to clients and on state change
  reapply an optimal config.

TEST PLAN
  Compiles.

REPOSITORY
  R127 KWayland

BRANCH
  outputPresentingEvent

REVISION DETAIL
  https://phabricator.kde.org/D23684

AFFECTED FILES
  src/client/protocols/outputdevice.xml

To: romangg, #kwin
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D23619: Introduce cloning and replication of output devices

2019-09-02 Thread Roman Gilg
romangg updated this revision to Diff 65263.
romangg marked 2 inline comments as done.
romangg added a comment.


  - Fix enum ordering, typo. Thx @kpiwowarski.

REPOSITORY
  R127 KWayland

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D23619?vs=65118=65263

BRANCH
  clone

REVISION DETAIL
  https://phabricator.kde.org/D23619

AFFECTED FILES
  src/client/outputconfiguration.cpp
  src/client/outputconfiguration.h
  src/client/outputdevice.cpp
  src/client/outputdevice.h
  src/client/protocols/output-management.xml
  src/client/protocols/outputdevice.xml
  src/client/registry.cpp
  src/server/outputchangeset.cpp
  src/server/outputchangeset.h
  src/server/outputchangeset_p.h
  src/server/outputconfiguration_interface.cpp
  src/server/outputdevice_interface.cpp
  src/server/outputdevice_interface.h
  src/server/outputmanagement_interface.cpp

To: romangg, #kwin
Cc: kpiwowarski, zzag, kde-frameworks-devel, LeGast00n, GB_2, michaelh, 
ngraham, bruns


D23619: Introduce cloning and replication of output devices

2019-09-02 Thread Roman Gilg
romangg added a dependent revision: D23665: [platforms/drm] Support output 
replication.

REPOSITORY
  R127 KWayland

REVISION DETAIL
  https://phabricator.kde.org/D23619

To: romangg, #kwin
Cc: zzag, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D23619: Introduce cloning and replication of output devices

2019-09-02 Thread Roman Gilg
romangg added a dependent revision: D23662: Wayland: Support output replication.

REPOSITORY
  R127 KWayland

REVISION DETAIL
  https://phabricator.kde.org/D23619

To: romangg, #kwin
Cc: zzag, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D23619: Introduce cloning and replication of output devices

2019-09-01 Thread Roman Gilg
romangg updated this revision to Diff 65118.
romangg added a comment.


  - Add trigger reason and direction enums
  - Disable replication on output device going away
  
  I decided to go with the enums to make it explicit. Also I plan on using these
  in the future with events to signal the current dpms state of the output 
device
  without necessity to go through the dpms protocol and by that have separation
  of dpms and output device control. In this context also the additional
  trigger_direction enum will be useful.

REPOSITORY
  R127 KWayland

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D23619?vs=65081=65118

BRANCH
  clone

REVISION DETAIL
  https://phabricator.kde.org/D23619

AFFECTED FILES
  src/client/outputconfiguration.cpp
  src/client/outputconfiguration.h
  src/client/outputdevice.cpp
  src/client/outputdevice.h
  src/client/protocols/output-management.xml
  src/client/protocols/outputdevice.xml
  src/client/registry.cpp
  src/server/outputchangeset.cpp
  src/server/outputchangeset.h
  src/server/outputchangeset_p.h
  src/server/outputconfiguration_interface.cpp
  src/server/outputdevice_interface.cpp
  src/server/outputdevice_interface.h
  src/server/outputmanagement_interface.cpp

To: romangg, #kwin
Cc: zzag, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D23619: Introduce cloning and replication of output devices

2019-08-31 Thread Roman Gilg
romangg added a comment.


  If the output device - that is the replication source - goes away (hot plug) 
we need to clear the `replicationSource` field in the other output device. This 
is straight forward with a single connect but question is if afterwards the 
replicate event should be send to clients with null string (and a flag 
indicating that this source removal was due to a hotplug and was not set 
explicitly) or if they should just conclude this from the other output device 
going away. A similar case is the replication source being switched off while 
staying connected. Here the output device does not go away, but the wl_output 
normally should. Still it makes sense to not replicate an output which is 
switched off. So remove the replication source in the compositor and then 
signaled to the clients?

REPOSITORY
  R127 KWayland

REVISION DETAIL
  https://phabricator.kde.org/D23619

To: romangg, #kwin
Cc: zzag, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D23619: Introduce cloning and replication of output devices

2019-08-31 Thread Roman Gilg
romangg retitled this revision from "[server] Introduce cloning and replication 
of output devices" to "Introduce cloning and replication of output devices".

REPOSITORY
  R127 KWayland

REVISION DETAIL
  https://phabricator.kde.org/D23619

To: romangg, #kwin
Cc: zzag, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D23619: [server] Introduce cloning and replication of output devices

2019-08-31 Thread Roman Gilg
romangg added inline comments.

INLINE COMMENTS

> zzag wrote in outputdevice.cpp:391
> Correction: that's not reliable way to check whether a C string is empty. You 
> assume that all empty strings have the same address, which in some cases 
> cannot be true, e.g. if the string is dynamically allocated.

Will change in next revision. It currently also does not yet check if the 
provided source uuid is not the one of the output-device itself.

REPOSITORY
  R127 KWayland

REVISION DETAIL
  https://phabricator.kde.org/D23619

To: romangg, #kwin
Cc: zzag, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D23619: [server] Introduce cloning and replication of output devices

2019-08-31 Thread Roman Gilg
romangg added a task: T11222: Reimagine output cloning.

REPOSITORY
  R127 KWayland

REVISION DETAIL
  https://phabricator.kde.org/D23619

To: romangg, #kwin
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D23619: [server] Introduce cloning and replication of output devices

2019-08-31 Thread Roman Gilg
romangg created this revision.
romangg added a reviewer: KWin.
Herald added a project: Frameworks.
Herald added a subscriber: kde-frameworks-devel.
romangg requested review of this revision.

REVISION SUMMARY
  The org_kde_kwin_outputdevice and respective org_kde_kwin_outputconfiguration
  protocols will be extended by events to indicate the current replication and
  clone status of an output device and a request to change the replication.
  
  Here the notion of clones designate outputs sharing the same properties in an
  immutable fahsion. This is mostly dependent on hardware characteristics when
  outputs share a common CRTC. Changes to such an output will inevitably apply 
to
  all its clones alike. The property is meant mainly to inform clients about
  such a relation.
  
  Replicas on the other side are arbitrary duplications of the image on an
  output on other ones. This is an one-to-many relation allowing one output as
  source of the image, also called the replication source, and arbitrary many
  other outputs as replicas of the replicaiton source. It is expected that the
  compositor has means to facilitate the replication in a sensible way, for
  example by providing black bars to compensate for different aspect ratios.
  
  Besides the protocol description changes and standard client API this patch
  introduces on server side new functions and algorithms to make use of this
  new interface in an efficient way:
  
  - Logical position and size are cached values of the current position and 
size of the output in compositor space respecting the replication status.
  - The cached clients-scale is the recommended scaling factor sent to clients 
on this output such that clients on the replication source and all replicas can 
provide buffers of optimal resolution. It is the ceiled maximum of all width 
and height quotients between replicas and replication source and the 
replication source scale itself. When an output is not a replica it always 
equals the ceiled scale value of the output.
  - The view-geometry provides a recommended geometry, which is cached as well, 
of positioning the actual viewable area on the output in pixel-coordinates. 
Using this geometry the aspect ratio of the final image on every replica will 
be the same one as the one of the replication source. The geometry returned is 
a rectangle positioned at the origin with size equaling output's mode size when 
the output is not a replica.

TEST PLAN
  Tested with patches in KWin, libkscreen and KScreen. Autotests in the future.

REPOSITORY
  R127 KWayland

BRANCH
  clone

REVISION DETAIL
  https://phabricator.kde.org/D23619

AFFECTED FILES
  src/client/outputconfiguration.cpp
  src/client/outputconfiguration.h
  src/client/outputdevice.cpp
  src/client/outputdevice.h
  src/client/protocols/output-management.xml
  src/client/protocols/outputdevice.xml
  src/client/registry.cpp
  src/server/outputchangeset.cpp
  src/server/outputchangeset.h
  src/server/outputchangeset_p.h
  src/server/outputconfiguration_interface.cpp
  src/server/outputdevice_interface.cpp
  src/server/outputdevice_interface.h
  src/server/outputmanagement_interface.cpp

To: romangg, #kwin
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D23535: [server] Use cached current mode more and assert validness

2019-08-28 Thread Roman Gilg
This revision was automatically updated to reflect the committed changes.
Closed by commit R127:0c0a2710dd3b: [server] Use cached current mode more and 
assert validness (authored by romangg).

REPOSITORY
  R127 KWayland

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D23535?vs=64833=64843

REVISION DETAIL
  https://phabricator.kde.org/D23535

AFFECTED FILES
  src/server/outputdevice_interface.cpp
  src/server/outputdevice_interface.h

To: romangg, #kwin, davidedmundson
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D23493: [server] Cache current mode

2019-08-28 Thread Roman Gilg
This revision was automatically updated to reflect the committed changes.
romangg marked an inline comment as done.
Closed by commit R127:ce5e25a4b63c: [server] Cache current mode (authored by 
romangg).

REPOSITORY
  R127 KWayland

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D23493?vs=64740=64838

REVISION DETAIL
  https://phabricator.kde.org/D23493

AFFECTED FILES
  src/server/outputdevice_interface.cpp

To: romangg, #kwin, davidedmundson
Cc: davidedmundson, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, 
bruns


D23493: [server] Cache current mode

2019-08-28 Thread Roman Gilg
romangg marked 2 inline comments as done.
romangg added inline comments.

INLINE COMMENTS

> romangg wrote in outputdevice_interface.cpp:143
> Thanks. Will put it into a second diff.

See D23535 

REPOSITORY
  R127 KWayland

BRANCH
  cacheMode

REVISION DETAIL
  https://phabricator.kde.org/D23493

To: romangg, #kwin, davidedmundson
Cc: davidedmundson, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, 
bruns


D23535: [server] Use cached current mode more and assert validness

2019-08-28 Thread Roman Gilg
romangg created this revision.
romangg added a reviewer: KWin.
Herald added a project: Frameworks.
Herald added a subscriber: kde-frameworks-devel.
romangg requested review of this revision.

REVISION SUMMARY
  We can use the cached current mode in one more case. Additionally make it
  more explicit what a valid mode is and when to add them.

TEST PLAN
  Relevant autotests pass. KWin Wayland nested and DRM session work.

REPOSITORY
  R127 KWayland

BRANCH
  useCachedMode

REVISION DETAIL
  https://phabricator.kde.org/D23535

AFFECTED FILES
  src/server/outputdevice_interface.cpp
  src/server/outputdevice_interface.h

To: romangg, #kwin
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D23493: [server] Cache current mode

2019-08-28 Thread Roman Gilg
romangg added inline comments.

INLINE COMMENTS

> davidedmundson wrote in outputdevice_interface.cpp:143
> we can also just use currentMode directly here and remove the loop above

Thanks. Will put it into a second diff.

REPOSITORY
  R127 KWayland

BRANCH
  cacheMode

REVISION DETAIL
  https://phabricator.kde.org/D23493

To: romangg, #kwin, davidedmundson
Cc: davidedmundson, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, 
bruns


D23493: [server] Cache current mode

2019-08-27 Thread Roman Gilg
romangg added a dependent revision: D23495: Get output pixel size from output 
device.

REPOSITORY
  R127 KWayland

REVISION DETAIL
  https://phabricator.kde.org/D23493

To: romangg, #kwin
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D23493: [server] Cache current mode

2019-08-27 Thread Roman Gilg
romangg added a task: T11459: AbstractWaylandOutput and output device 
consolidation.

REPOSITORY
  R127 KWayland

REVISION DETAIL
  https://phabricator.kde.org/D23493

To: romangg, #kwin
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D23493: [server] Cache current mode

2019-08-27 Thread Roman Gilg
romangg created this revision.
romangg added a reviewer: KWin.
Herald added a project: Frameworks.
Herald added a subscriber: kde-frameworks-devel.
romangg requested review of this revision.

REVISION SUMMARY
  Instead of looping over all modes for retrieving current mode data copy it
  to a separate variable.

TEST PLAN
  KWin auto tests pass and KScreen in Wayland nested session shows correct
  information.

REPOSITORY
  R127 KWayland

BRANCH
  cacheMode

REVISION DETAIL
  https://phabricator.kde.org/D23493

AFFECTED FILES
  src/server/outputdevice_interface.cpp

To: romangg, #kwin
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D23224: Fix capitalization of Nextcloud

2019-08-17 Thread Roman Gilg
romangg added a comment.


  This means only change it in lines without `[..]`.

REPOSITORY
  R495 Purpose Library

REVISION DETAIL
  https://phabricator.kde.org/D23224

To: z3ntu
Cc: romangg, pino, kde-frameworks-devel, LeGast00n, michaelh, ngraham, bruns


Unified git commit message guideline

2019-08-11 Thread Roman Gilg
For KWin we think about a message guideline because our current best
practice that we got used to over time is just sometimes putting tags
in square brackets at the beginning of the subject line for indicating
the location of the change in code but somebody noted having a square
bracket in the beginning leads to problems with certain git log parser
tools.

Asking around on IRC it seems we should expand the scope. Apparently
also other KDE projects could profit from a policy and some tooling
around it. We currently have the Phabricator commit message formatting
through arc, but this doesn't expand to the important subject line and
it will go away soon anyway with our move to GitLab.

After looking around a bit what I found to be very interesting was the
Conventional Commits specification[1]. It is based on the AngularJS
commit message policy, which is imo a very well formulated policy.

Besides the policy they offer also several tools to check own commits
and to be integrated into a CI system: there is commitlint[2] to check
commits on obeying the policy and conventional-changelog[3] to create
changelog documents automatically from these commits.

For example looking at the latest changelog of Frameworks[4] in the
long list of commits there is no differentiation between fixes,
features and other work. Also sometimes there are tags, sometimes not,
and if there are sometimes they are in square brackets, sometimes with
colons.

In contrast a changelog generated from commits following the
conventional commits specification can be easily sorted and
reformatted. An example for that is Angular's changelog[5].

What do you think about such a guideline? Would an admin be interested
in putting these tools onto a test instance? I know admins currently
have much to do with GitLab transition though, so I write this message
also as a reminder to myself to pick it up again afterwards if there
is no time right now.

[1] https://www.conventionalcommits.org
[2] https://commitlint.js.org
[3] https://github.com/conventional-changelog/conventional-changelog
[4] https://kde.org/announcements/kde-frameworks-5.61.0.php
[5] https://github.com/angular/angular/blob/master/CHANGELOG.md


D10747: Implement zwp_linux_dmabuf_v1

2019-08-06 Thread Roman Gilg
This revision was not accepted when it landed; it landed in state "Needs 
Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit R127:1dd57d909165: Implement zwp_linux_dmabuf_v1 (authored by 
romangg).

REPOSITORY
  R127 KWayland

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D10747?vs=63224=63228

REVISION DETAIL
  https://phabricator.kde.org/D10747

AFFECTED FILES
  src/server/CMakeLists.txt
  src/server/buffer_interface.cpp
  src/server/buffer_interface.h
  src/server/display.cpp
  src/server/display.h
  src/server/drm_fourcc.h
  src/server/linuxdmabuf_v1_interface.cpp
  src/server/linuxdmabuf_v1_interface.h

To: romangg, #kwin, #plasma, graesslin, davidedmundson, mart, fredrik
Cc: zzag, kde-frameworks-devel, romangg, plasma-devel, LeGast00n, hannahk, 
jraleigh, sgureev, fbampaloukas, GB_2, ragreen, Pitel, schernikov, michaelh, 
ZrenBot, ngraham, bruns, alexeymin, himcesjf, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, eliasp, sebas, apol, mart, hein


D10747: Implement zwp_linux_dmabuf_v1

2019-08-06 Thread Roman Gilg
romangg edited the test plan for this revision.

REPOSITORY
  R127 KWayland

REVISION DETAIL
  https://phabricator.kde.org/D10747

To: romangg, #kwin, #plasma, graesslin, davidedmundson, mart, fredrik
Cc: zzag, kde-frameworks-devel, romangg, plasma-devel, LeGast00n, hannahk, 
jraleigh, sgureev, fbampaloukas, GB_2, ragreen, Pitel, schernikov, michaelh, 
ZrenBot, ngraham, bruns, alexeymin, himcesjf, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, eliasp, sebas, apol, mart, hein


D10747: Implement zwp_linux_dmabuf_v1

2019-08-06 Thread Roman Gilg
romangg updated this revision to Diff 63224.
romangg added a comment.


  Rebase on master.

REPOSITORY
  R127 KWayland

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D10747?vs=61912=63224

BRANCH
  dmaBuf

REVISION DETAIL
  https://phabricator.kde.org/D10747

AFFECTED FILES
  src/server/CMakeLists.txt
  src/server/buffer_interface.cpp
  src/server/buffer_interface.h
  src/server/display.cpp
  src/server/display.h
  src/server/drm_fourcc.h
  src/server/linuxdmabuf_v1_interface.cpp
  src/server/linuxdmabuf_v1_interface.h

To: romangg, #kwin, #plasma, graesslin, davidedmundson, mart, fredrik
Cc: zzag, kde-frameworks-devel, romangg, plasma-devel, LeGast00n, hannahk, 
jraleigh, sgureev, fbampaloukas, GB_2, ragreen, Pitel, schernikov, michaelh, 
ZrenBot, ngraham, bruns, alexeymin, himcesjf, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, eliasp, sebas, apol, mart, hein


Coding style: white space around asterisks

2019-08-06 Thread Roman Gilg
Hi,

Frameworks C++ coding style for pointer declarations follows the
asterisk to the right approach like Qt coding style recommends.

This is most often a sensible choice but is difficult to read in my
opinion when there is no identifier to the right the asterisk is
associated with, for example for function return types and casts.

Because of that I prefer a style like explained here:
https://www.quora.com/Where-should-I-put-the-asterisk-for-pointers-in-C++-Is-it-int*-ptr-int-*-ptr-or-int-*ptr/answer/David-Vandevoorde

Any arguments for or against doing it this way?

Cheers,
Roman


D18114: FakeInput: add support for pointer move with absolute coordinates

2019-07-20 Thread Roman Gilg
romangg added a comment.


  @jgrulich With D22571  looking promising 
do you want to put the keyboard parts of this diff into a separate one? There 
is still the question about keysyms and key events but we should discuss this 
in the new diff. Maybe we can have both: Keysyms for special keys / 
combinations like Alt+Tab and text input via text-input protocol?

REPOSITORY
  R127 KWayland

REVISION DETAIL
  https://phabricator.kde.org/D18114

To: jgrulich, davidedmundson, graesslin, zzag
Cc: romangg, graesslin, zzag, kde-frameworks-devel, LeGast00n, sbergeron, 
michaelh, ngraham, bruns


D10747: Implement zwp_linux_dmabuf_v1

2019-07-17 Thread Roman Gilg
romangg added a comment.


  If there are no objections I would push this soon.
  
  There is one remaining annoyance I have with the current version: the name of 
the class inside the interface the compositor has to subclass for interfacing 
with KWayland. I changed the name from Bridge to Impl since Bridge can be 
anything and as we use the name Impl in KWin already for stuff like this. But 
there it's used for the subclass and not for the abstract implementation base 
class. Any other idea for a good name?

REPOSITORY
  R127 KWayland

REVISION DETAIL
  https://phabricator.kde.org/D10747

To: romangg, #kwin, #plasma, graesslin, davidedmundson, mart, fredrik
Cc: zzag, kde-frameworks-devel, romangg, plasma-devel, LeGast00n, fmonteiro, 
sbergeron, hannahk, jraleigh, sgureev, fbampaloukas, GB_2, ragreen, Pitel, 
schernikov, michaelh, ZrenBot, ngraham, bruns, alexeymin, himcesjf, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, eliasp, sebas, apol, mart, hein


D10747: Implement zwp_linux_dmabuf_v1

2019-07-17 Thread Roman Gilg
romangg updated this revision to Diff 61912.
romangg added a comment.


  - Rebase on master
  - Use packaged dma-buf xml

REPOSITORY
  R127 KWayland

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D10747?vs=60654=61912

BRANCH
  dmaBuf

REVISION DETAIL
  https://phabricator.kde.org/D10747

AFFECTED FILES
  src/server/CMakeLists.txt
  src/server/buffer_interface.cpp
  src/server/buffer_interface.h
  src/server/display.cpp
  src/server/display.h
  src/server/drm_fourcc.h
  src/server/linuxdmabuf_v1_interface.cpp
  src/server/linuxdmabuf_v1_interface.h

To: romangg, #kwin, #plasma, graesslin, davidedmundson, mart, fredrik
Cc: zzag, kde-frameworks-devel, romangg, plasma-devel, LeGast00n, fmonteiro, 
sbergeron, hannahk, jraleigh, sgureev, fbampaloukas, GB_2, ragreen, Pitel, 
schernikov, michaelh, ZrenBot, ngraham, bruns, alexeymin, himcesjf, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, eliasp, sebas, apol, mart, hein


D21672: [PowerStateMonitor] Be conservative when determining power state

2019-07-16 Thread Roman Gilg
romangg added a comment.


  The bug report was online for two weeks and it was categorized as Baloo bug. 
You had more than enough time to notice it.
  
  I hoped I wouldn't need to waste any more time on this issue besides the time 
I already had to spent for working around this bug for two weeks, but now I had 
to setup baloo compilation myself, had to git bisect it and had to inform you. 
And now above all this unnecessary shit I have to deal with your ego being 
damaged when I reverted one isolated three lines patch of yours. Good news for 
you: the revert didn't fix the problem after reboot what I noticed now after I 
did one. Just when I restart baloo there is no more spam. So you can try to 
find the right solution now or you can continue being angry for no reason 
whatsoever.
  
  Because guess what: you can revert the revert at any time or even better hand 
in a patch to fix the whole issue after all.

REPOSITORY
  R293 Baloo

REVISION DETAIL
  https://phabricator.kde.org/D21672

To: bruns, #baloo, ngraham, astippich, poboiko
Cc: broulik, romangg, kde-frameworks-devel, #baloo, LeGast00n, sbergeron, 
fbampaloukas, domson, ashaposhnikov, michaelh, astippich, spoorun, ngraham, 
bruns, abrahams


D21672: [PowerStateMonitor] Be conservative when determining power state

2019-07-16 Thread Roman Gilg
romangg added a comment.


  Reverted by d6d86cb86c 
 on 
master. See https://bugs.kde.org/show_bug.cgi?id=409405 for more info. Possibly 
a critical problem in released 5.60 @bruns.

REPOSITORY
  R293 Baloo

REVISION DETAIL
  https://phabricator.kde.org/D21672

To: bruns, #baloo, ngraham, astippich, poboiko
Cc: romangg, kde-frameworks-devel, #baloo, LeGast00n, sbergeron, fbampaloukas, 
domson, ashaposhnikov, michaelh, astippich, spoorun, ngraham, bruns, abrahams


D22459: Send wl_pointer.frame when emulating pointer events out of touch ones

2019-07-14 Thread Roman Gilg
romangg added a comment.


  Please include the context for this diff.

REPOSITORY
  R127 KWayland

REVISION DETAIL
  https://phabricator.kde.org/D22459

To: dos, #kwin
Cc: romangg, kde-frameworks-devel, LeGast00n, sbergeron, michaelh, ngraham, 
bruns


D22216: RFC: Use wayland-protocols

2019-07-03 Thread Roman Gilg
romangg accepted this revision.
romangg added a subscriber: davidedmundson.
romangg added a comment.
This revision is now accepted and ready to land.


  Yea, let's wait until 5.60 branched and then push for 5.61 (after next 
weekend) as long as @davidedmundson does not say anything against it until then.

REPOSITORY
  R127 KWayland

BRANCH
  use-wayland-protocols

REVISION DETAIL
  https://phabricator.kde.org/D22216

To: zzag, #kwin, #frameworks, romangg
Cc: davidedmundson, apol, romangg, asturmlechner, kde-frameworks-devel, 
LeGast00n, michaelh, ngraham, bruns


D22216: RFC: Use wayland-protocols

2019-07-02 Thread Roman Gilg
romangg added a comment.


  Makes sense to me. Why was it done differently until now?

REPOSITORY
  R127 KWayland

REVISION DETAIL
  https://phabricator.kde.org/D22216

To: zzag, #kwin, #frameworks
Cc: romangg, asturmlechner, kde-frameworks-devel, LeGast00n, michaelh, ngraham, 
bruns


D10747: Implement zwp_linux_dmabuf_v1

2019-06-27 Thread Roman Gilg
romangg added a dependent revision: D10750: wayland: Add support for 
zwp_linux_dmabuf.

REPOSITORY
  R127 KWayland

REVISION DETAIL
  https://phabricator.kde.org/D10747

To: romangg, #kwin, #plasma, graesslin, davidedmundson, mart, fredrik
Cc: kde-frameworks-devel, romangg, plasma-devel, LeGast00n, hannahk, jraleigh, 
sgureev, fbampaloukas, GB_2, ragreen, Pitel, schernikov, michaelh, ZrenBot, 
ngraham, bruns, alexeymin, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, eliasp, sebas, apol, mart, hein


D10747: Implement zwp_linux_dmabuf_v1

2019-06-25 Thread Roman Gilg
romangg edited the test plan for this revision.

REPOSITORY
  R127 KWayland

REVISION DETAIL
  https://phabricator.kde.org/D10747

To: romangg, #kwin, #plasma, graesslin, davidedmundson, mart, fredrik
Cc: kde-frameworks-devel, romangg, plasma-devel, LeGast00n, hannahk, jraleigh, 
sgureev, fbampaloukas, GB_2, ragreen, Pitel, schernikov, michaelh, ZrenBot, 
ngraham, bruns, alexeymin, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, eliasp, sebas, apol, mart, hein


D10747: Implement zwp_linux_dmabuf_v1

2019-06-25 Thread Roman Gilg
romangg updated this revision to Diff 60654.
romangg added a comment.


  - D-pointer DmaBufBuffer
  - Only allow one create request in any case
  - Params in private interface class
  - typedef for LinuxDmabufUnstableV1Interface
  - Small cleanup
  - Set buffer privates and delete impl on interface destroy

REPOSITORY
  R127 KWayland

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D10747?vs=60429=60654

BRANCH
  dmaBuf

REVISION DETAIL
  https://phabricator.kde.org/D10747

AFFECTED FILES
  src/client/protocols/linux-dmabuf-unstable-v1.xml
  src/server/CMakeLists.txt
  src/server/buffer_interface.cpp
  src/server/buffer_interface.h
  src/server/display.cpp
  src/server/display.h
  src/server/drm_fourcc.h
  src/server/linuxdmabuf_v1_interface.cpp
  src/server/linuxdmabuf_v1_interface.h

To: romangg, #kwin, #plasma, graesslin, davidedmundson, mart, fredrik
Cc: kde-frameworks-devel, romangg, plasma-devel, LeGast00n, hannahk, jraleigh, 
sgureev, fbampaloukas, GB_2, ragreen, Pitel, schernikov, michaelh, ZrenBot, 
ngraham, bruns, alexeymin, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, eliasp, sebas, apol, mart, hein


D10747: Implement zwp_linux_dmabuf_v1

2019-06-23 Thread Roman Gilg
romangg updated this revision to Diff 60429.
romangg added a comment.


  - Update protocol xml to wayland-protocols master

REPOSITORY
  R127 KWayland

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D10747?vs=60366=60429

BRANCH
  dmaBuf

REVISION DETAIL
  https://phabricator.kde.org/D10747

AFFECTED FILES
  src/client/protocols/linux-dmabuf-unstable-v1.xml
  src/server/CMakeLists.txt
  src/server/buffer_interface.cpp
  src/server/buffer_interface.h
  src/server/display.cpp
  src/server/display.h
  src/server/drm_fourcc.h
  src/server/linuxdmabuf_v1_interface.cpp
  src/server/linuxdmabuf_v1_interface.h

To: romangg, #kwin, #plasma, graesslin, davidedmundson, mart, fredrik
Cc: kde-frameworks-devel, romangg, plasma-devel, LeGast00n, hannahk, jraleigh, 
sgureev, fbampaloukas, GB_2, ragreen, Pitel, schernikov, michaelh, ZrenBot, 
ngraham, bruns, alexeymin, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, eliasp, sebas, apol, mart, hein


D10747: Implement zwp_linux_dmabuf_v1

2019-06-22 Thread Roman Gilg
romangg updated this revision to Diff 60366.
romangg added a comment.


  - Minor style changes

REPOSITORY
  R127 KWayland

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D10747?vs=60364=60366

BRANCH
  dmaBuf

REVISION DETAIL
  https://phabricator.kde.org/D10747

AFFECTED FILES
  src/client/protocols/linux-dmabuf-unstable-v1.xml
  src/server/CMakeLists.txt
  src/server/buffer_interface.cpp
  src/server/buffer_interface.h
  src/server/display.cpp
  src/server/display.h
  src/server/drm_fourcc.h
  src/server/linuxdmabuf_v1_interface.cpp
  src/server/linuxdmabuf_v1_interface.h

To: romangg, #kwin, #plasma, graesslin, davidedmundson, mart, fredrik
Cc: kde-frameworks-devel, romangg, plasma-devel, LeGast00n, hannahk, jraleigh, 
sgureev, fbampaloukas, GB_2, ragreen, Pitel, schernikov, michaelh, ZrenBot, 
ngraham, bruns, alexeymin, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, eliasp, sebas, apol, mart, hein


D10747: Implement zwp_linux_dmabuf_v1

2019-06-22 Thread Roman Gilg
romangg updated this revision to Diff 60364.
romangg added a comment.


  - Revert drm_fourcc.h whitespace changes

REPOSITORY
  R127 KWayland

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D10747?vs=60360=60364

BRANCH
  dmaBuf

REVISION DETAIL
  https://phabricator.kde.org/D10747

AFFECTED FILES
  src/client/protocols/linux-dmabuf-unstable-v1.xml
  src/server/CMakeLists.txt
  src/server/buffer_interface.cpp
  src/server/buffer_interface.h
  src/server/display.cpp
  src/server/display.h
  src/server/drm_fourcc.h
  src/server/linuxdmabuf_v1_interface.cpp
  src/server/linuxdmabuf_v1_interface.h

To: romangg, #kwin, #plasma, graesslin, davidedmundson, mart, fredrik
Cc: kde-frameworks-devel, romangg, plasma-devel, LeGast00n, hannahk, jraleigh, 
sgureev, fbampaloukas, GB_2, ragreen, Pitel, schernikov, michaelh, ZrenBot, 
ngraham, bruns, alexeymin, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, eliasp, sebas, apol, mart, hein


D10747: Implement zwp_linux_dmabuf_v1

2019-06-22 Thread Roman Gilg
romangg updated this revision to Diff 60360.
romangg added a comment.


  Rebase on master.

REPOSITORY
  R127 KWayland

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D10747?vs=28986=60360

BRANCH
  dmaBuf

REVISION DETAIL
  https://phabricator.kde.org/D10747

AFFECTED FILES
  src/client/protocols/linux-dmabuf-unstable-v1.xml
  src/server/CMakeLists.txt
  src/server/buffer_interface.cpp
  src/server/buffer_interface.h
  src/server/display.cpp
  src/server/display.h
  src/server/drm_fourcc.h
  src/server/linuxdmabuf_v1_interface.cpp
  src/server/linuxdmabuf_v1_interface.h

To: romangg, #kwin, #plasma, graesslin, davidedmundson, mart, fredrik
Cc: kde-frameworks-devel, romangg, plasma-devel, LeGast00n, hannahk, jraleigh, 
sgureev, fbampaloukas, GB_2, ragreen, Pitel, schernikov, michaelh, ZrenBot, 
ngraham, bruns, alexeymin, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, eliasp, sebas, apol, mart, hein


D10747: Implement zwp_linux_dmabuf_v1

2019-06-22 Thread Roman Gilg
romangg commandeered this revision.
romangg added a reviewer: fredrik.
romangg added a comment.


  Thanks @fredrik for initiating this. I'll try to finish the patches up.

REPOSITORY
  R127 KWayland

REVISION DETAIL
  https://phabricator.kde.org/D10747

To: romangg, #kwin, #plasma, graesslin, davidedmundson, mart, fredrik
Cc: kde-frameworks-devel, romangg, plasma-devel, LeGast00n, hannahk, jraleigh, 
sgureev, fbampaloukas, GB_2, ragreen, Pitel, schernikov, michaelh, ZrenBot, 
ngraham, bruns, alexeymin, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, eliasp, sebas, apol, mart, hein


D20193: Expose locked keystates on KModifierKeyInfo when on wayland

2019-06-20 Thread Roman Gilg
romangg accepted this revision.
romangg added a comment.
This revision is now accepted and ready to land.


  Please add description, otherwise let's try it out.

REPOSITORY
  R273 KGuiAddons

BRANCH
  wayland_keystate

REVISION DETAIL
  https://phabricator.kde.org/D20193

To: apol, romangg
Cc: romangg, dfaure, kde-frameworks-devel, LeGast00n, michaelh, ngraham, bruns


D15910: Implement wl_surface::damage_buffer

2019-05-08 Thread Roman Gilg
This revision was automatically updated to reflect the committed changes.
Closed by commit R127:b71e10359725: Implement wl_surface::damage_buffer 
(authored by romangg).

CHANGED PRIOR TO COMMIT
  https://phabricator.kde.org/D15910?vs=48477=57749#toc

REPOSITORY
  R127 KWayland

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D15910?vs=48477=57749

REVISION DETAIL
  https://phabricator.kde.org/D15910

AFFECTED FILES
  autotests/client/test_wayland_surface.cpp
  src/client/registry.cpp
  src/client/surface.cpp
  src/client/surface.h
  src/server/compositor_interface.cpp
  src/server/surface_interface.cpp
  src/server/surface_interface_p.h

To: romangg, #kwin, davidedmundson
Cc: davidedmundson, zzag, kde-frameworks-devel, michaelh, ngraham, bruns


D18824: Implement wl_eglstream_controller Server Interface

2019-04-13 Thread Roman Gilg
romangg accepted this revision.
romangg added a comment.
This revision is now accepted and ready to land.


  Thanks. Don't forget to add the isValid check to the KWin patches now. Maybe 
also add a comment to the KWayland code, what's the reason for the separate 
create() call and that we want to change this in KF6 via a virtualized create 
method.

INLINE COMMENTS

> eglstream_controller_interface.h:56
> + */
> +void streamConsumerAttached(SurfaceInterface *surface, void *eglStream, 
> wl_array *attribs);
> +private:

wl_resource *eglStream?

REPOSITORY
  R127 KWayland

REVISION DETAIL
  https://phabricator.kde.org/D18824

To: ekurzinger, romangg, davidedmundson, #kwin
Cc: zzag, ngraham, mati865, schernikov, guilhermesi, kde-frameworks-devel, 
michaelh, bruns


D18824: Implement wl_eglstream_controller Server Interface

2019-04-12 Thread Roman Gilg
romangg added a comment.


  The xml file is missing form the diff now. Don't forget to add it when 
pushing.
  
  In the first revision the interface failed to create when the dynamically 
loaded library was not present. Now it just fails silently on bind. Why is this 
ok?

INLINE COMMENTS

> romangg wrote in display.h:310
> 5.56

Now it would be 5.58 (change it when pushing).

REPOSITORY
  R127 KWayland

REVISION DETAIL
  https://phabricator.kde.org/D18824

To: ekurzinger, romangg, davidedmundson, #kwin
Cc: ngraham, mati865, schernikov, guilhermesi, kde-frameworks-devel, michaelh, 
bruns


D19255: WIP: Alternate approach to D19253

2019-02-24 Thread Roman Gilg
romangg added a comment.


  In D19255#418729 , @davidedmundson 
wrote:
  
  > > Maybe add a TODO comment on merge to the setLogicalSize (that it does not 
handle the size plus scale change correctly in every case).
  >
  > Can you expand on what you mean?
  
  
  I thought we discussed this problem already in the other diff. Example:
  
  Single 4K Monitor is used in 1080p with 1 times scaling: logical size is 1080p
  Now an atomic change comes of: Resolution set to 4K, scaling factor to 2. 
This triggers a wl_output::done event, but the logical size stays the same, 
i.e. not necessary set the dirty bit.
  
  I just realize with our current KWin/KWayland code, which has to set the 
logical size on every pixelSize and scale change we do not have this problem at 
the moment, but later if we want to send only one done event per atomic 
configuration change a single wl_output::done event might be generated but not 
the respective xdg_output::done event.

REPOSITORY
  R127 KWayland

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D19255

To: davidedmundson, #kwin, romangg
Cc: romangg, kde-frameworks-devel, michaelh, ngraham, bruns


D19255: WIP: Alternate approach to D19253

2019-02-24 Thread Roman Gilg
romangg added a comment.


  Also CCBUG: 400987

REPOSITORY
  R127 KWayland

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D19255

To: davidedmundson, #kwin, romangg
Cc: romangg, kde-frameworks-devel, michaelh, ngraham, bruns


D19255: WIP: Alternate approach to D19253

2019-02-24 Thread Roman Gilg
romangg added a comment.


  Maybe add a TODO comment on merge to the setLogicalSize (that it does not 
handle the size plus scale change correctly in every case).

REPOSITORY
  R127 KWayland

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D19255

To: davidedmundson, #kwin, romangg
Cc: romangg, kde-frameworks-devel, michaelh, ngraham, bruns


D19255: WIP: Alternate approach to D19253

2019-02-24 Thread Roman Gilg
romangg accepted this revision.
romangg added a comment.
This revision is now accepted and ready to land.


  I just tested it and it works. As you said in D19253 
 has same caveat as I pointed out not being 
in sync with wl_output::done event in case resolution and scale factor change 
at the same time such that logical size stays the same.
  
  But let's merge this patch, which is nicer than my solution in D19253 
, as a quick fix for every other case.

REPOSITORY
  R127 KWayland

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D19255

To: davidedmundson, #kwin, romangg
Cc: romangg, kde-frameworks-devel, michaelh, ngraham, bruns


D15910: Implement wl_surface::damage_buffer

2019-02-22 Thread Roman Gilg
romangg added a comment.


  Will be pushed after 5.56 branched off.

REPOSITORY
  R127 KWayland

BRANCH
  damageBuffer

REVISION DETAIL
  https://phabricator.kde.org/D15910

To: romangg, #kwin, davidedmundson
Cc: davidedmundson, zzag, kde-frameworks-devel, michaelh, ngraham, bruns


D18824: Implement wl_eglstream_controller Server Interface

2019-02-09 Thread Roman Gilg
romangg added inline comments.

INLINE COMMENTS

> CMakeLists.txt:349
>xdgoutput_interface.h
> +  eglstream_controller_interface.h
>  )

alphabetical sorted

> display.cpp:529
> +} else {
> +qCWarning(KWAYLAND_SERVER) << "Unable to load 
> libnvidia-egl-wayland.so.1";
> +}

There should be always a non-null object returned. Instead check somewhere 
before the create call of EglStreamControllerInterface if the library can be 
loaded. Also this would put the logic and the QLibrary include in the class 
file and not in display.cpp, what I would prefer.

One could overwrite the `Global::create` method in the 
`EglStreamControllerInterface` child class. From there then call 
QLibrary::resolve and only if it succeeds the parent create method. Afterwards 
compositor needs to check `Global::isValid`.

The control flow would then be in the compositor:

  auto *e = display->createEglStreamControllerInterface();
  // other initial setup
  e->create();
  if (!e->isValid()) {
  // error handling
  }

It's unfortunate that the create method is not virtual in Global. We can change 
this in KF6.

> display.h:310
> + * @return the created EGL Stream controller, or nullptr on failure
> + * @since 5.55
> + */

5.56

> eglstream_controller_interface.cpp:53
> +Q_UNUSED(client);
> +Q_UNUSED(attribs);
> +Private *p = static_cast(wl_resource_get_user_data(resource));

Why is attribs unused in this implementation?

> eglstream_controller_interface.cpp:54
> +Q_UNUSED(attribs);
> +Private *p = static_cast(wl_resource_get_user_data(resource));
> +emit 
> p->m_controller->streamConsumerAttached(SurfaceInterface::get(surface), (void 
> *)eglStream);

Use `Global::Private::cast`.

> eglstream_controller_interface.cpp:58
> +
> +EglStreamControllerInterface::Private::Private(EglStreamControllerInterface 
> *controller,
> +   Display *display,

Rename `controller` and `m_controller` below to `q` for enhanced pimpl street 
cred.

> eglstream_controller_interface.h:28
> +#include "surface_interface.h"
> +
> +namespace KWayland

Cleanup includes

REPOSITORY
  R127 KWayland

REVISION DETAIL
  https://phabricator.kde.org/D18824

To: ekurzinger, romangg, davidedmundson, zzag, #kwin
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D18824: Implement wl_eglstream_controller Server Interface

2019-02-09 Thread Roman Gilg
romangg requested changes to this revision.
romangg added a comment.
This revision now requires changes to proceed.


  Impressive. Some small issues to resolve.

REPOSITORY
  R127 KWayland

REVISION DETAIL
  https://phabricator.kde.org/D18824

To: ekurzinger, romangg, davidedmundson, zzag, #kwin
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D15421: [server] Add surface data proxy mechanism

2019-02-06 Thread Roman Gilg
This revision was not accepted when it landed; it landed in state "Needs 
Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit R127:0b33f078bd1d: [server] Add surface data proxy mechanism 
(authored by romangg).

CHANGED PRIOR TO COMMIT
  https://phabricator.kde.org/D15421?vs=48515=51027#toc

REPOSITORY
  R127 KWayland

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D15421?vs=48515=51027

REVISION DETAIL
  https://phabricator.kde.org/D15421

AFFECTED FILES
  src/server/datadevice_interface.cpp
  src/server/datadevice_interface.h
  src/server/pointer_interface.cpp
  src/server/seat_interface.cpp
  src/server/surface_interface.cpp
  src/server/surface_interface.h
  src/server/surface_interface_p.h

To: romangg, #kwin
Cc: davidedmundson, kde-frameworks-devel, michaelh, ngraham, bruns


D15023: [server] Add selectionChanged signal

2019-02-06 Thread Roman Gilg
This revision was automatically updated to reflect the committed changes.
Closed by commit R127:8caff837109c: [server] Add selectionChanged signal 
(authored by romangg).

CHANGED PRIOR TO COMMIT
  https://phabricator.kde.org/D15023?vs=48513=51022#toc

REPOSITORY
  R127 KWayland

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D15023?vs=48513=51022

REVISION DETAIL
  https://phabricator.kde.org/D15023

AFFECTED FILES
  src/server/seat_interface.cpp
  src/server/seat_interface.h

To: romangg, #kwin, davidedmundson
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D17122: Add option to use wl_display_add_socket_auto

2019-01-25 Thread Roman Gilg
romangg accepted this revision.
This revision is now accepted and ready to land.

REPOSITORY
  R127 KWayland

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D17122

To: fvogt, #kwin, #plasma, romangg
Cc: davidedmundson, zzag, romangg, kde-frameworks-devel, michaelh, ngraham, 
bruns


D17122: Add option to use wl_display_add_socket_auto

2019-01-25 Thread Roman Gilg
romangg added a dependent revision: D18522: Name Wayland socket automatically 
when no socket name was specified.

REPOSITORY
  R127 KWayland

REVISION DETAIL
  https://phabricator.kde.org/D17122

To: fvogt, #kwin, #plasma, romangg
Cc: davidedmundson, zzag, romangg, kde-frameworks-devel, michaelh, ngraham, 
bruns


D17122: Add option to use wl_display_add_socket_auto

2019-01-25 Thread Roman Gilg
romangg added inline comments.

INLINE COMMENTS

> fvogt wrote in test_display.cpp:223
> That won't work reliably either though - if wayland-0 is free, but wayland-1 
> is used, it would pick wayland-0 and wayland-2. Maybe it should just check 
> that starting both displays at the same time succeeds and that their socket 
> names are not equal.

That's why I said "do it one more time from there until you find the second 
wayland-y".
For example (semi-pseudo):

  QString name1, name2;
  
  int cnt = -1;
  while(true) {
  cnt++;
  const QString name = "wayland-" + str(cnt);
  if (!runtimeDir.exists(name)) {
  name1 = name;
  break;
  }
  }
  while(true) {
  cnt++;
  const QString name = "wayland-" + str(cnt);
  if (!runtimeDir.exists(name)) {
  name2 = name;
  break;
  }
  }

David's solution is nicer though.

REPOSITORY
  R127 KWayland

REVISION DETAIL
  https://phabricator.kde.org/D17122

To: fvogt, #kwin, #plasma, romangg
Cc: davidedmundson, zzag, romangg, kde-frameworks-devel, michaelh, ngraham, 
bruns


D17122: Add option to use wl_display_add_socket_auto

2019-01-25 Thread Roman Gilg
romangg requested changes to this revision.
romangg added inline comments.
This revision now requires changes to proceed.

INLINE COMMENTS

> test_display.cpp:223
> +QVERIFY(runtimeDir.exists());
> +QVERIFY(!runtimeDir.exists("wayland-0"));
> +QVERIFY(!runtimeDir.exists("wayland-1"));

This fails when one tries to run the test inside another Wayland session, which 
already uses the wayland-0 socket name.

What you could do here is loop until you find the first non-existing 
`wayland-x` in the runtime dir. Then do it one more time from there until you 
find the second `wayland-y`. Remember x,y and compare these below against the 
created socket names.

REPOSITORY
  R127 KWayland

REVISION DETAIL
  https://phabricator.kde.org/D17122

To: fvogt, #kwin, #plasma, romangg
Cc: zzag, romangg, kde-frameworks-devel, michaelh, ngraham, bruns


D17122: Add option to use wl_display_add_socket_auto

2019-01-18 Thread Roman Gilg
romangg added inline comments.

INLINE COMMENTS

> display.cpp:87
> +bool running = false,
> + automaticSocketNaming = false;
>  QList outputs;

bool running = false;
  bool automaticSocketNaming = false;

REPOSITORY
  R127 KWayland

REVISION DETAIL
  https://phabricator.kde.org/D17122

To: fvogt, #kwin, #plasma
Cc: zzag, romangg, kde-frameworks-devel, michaelh, ngraham, bruns


D17122: RFC: Use wl_display_add_socket_auto by default

2019-01-18 Thread Roman Gilg
romangg added a comment.


  In D17122#395745 , @fvogt wrote:
  
  > > Hmm, maybe then add another setter setAutomaticSocketNaming instead to 
switch to automatic socket name query instead. When it's not called before 
start it would fall back to old behavior.
  >
  > That would need changes in KWin though so Plasma 5.16 only :-(
  
  
  Yes, that's fine. Do you need it for something in 5.15?

REPOSITORY
  R127 KWayland

REVISION DETAIL
  https://phabricator.kde.org/D17122

To: fvogt, #kwin, #plasma
Cc: romangg, kde-frameworks-devel, michaelh, ngraham, bruns


  1   2   3   4   >