[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kwin
Subject:    Re: Review Request 109778: Replacement for PlasmaCore Dialog
From:       Thomas_Lübking <thomas.luebking () gmail ! com>
Date:       2013-03-28 22:18:45
Message-ID: 20130328221845.18103.55357 () vidsolbach ! de
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


> On March 28, 2013, 3:33 p.m., Thomas Lübking wrote:
> > Given with esp. QML the shadows can already be part of the window - what makes \
> > this different from Plasma.Dialog other than the bypass windows hint? 
> > Ie. what's worth risking to dip into some sort of forked API for kwin only (which \
> > actually backrefs plasma, so RazorQt is not an argument ;-) 
> > As for the bypass requirement, my initial thought after Michail came up with that \
> > for the second time was to just add an abort() into events.cpp or maybe deny \
> > management and push out an error message instead.
> 
> Martin Gräßlin wrote:
> ah the shadows/translucency is not the reason I did this. That's more a lucky side \
> effect. 
> The things I did this for are not yet implemented. When playing with "Present \
>                 Windows 2" I noticed the following issues with PlasmaCore Dialog:
> * it honors panels - good for Plasma, bad for us
> * it cannot be set to not have a background (we will need that if we want to have \
>                 transitions from current window positions)
> * using Qt.Popup to get mouse/keyboard breaks with multi screen. Only one of the \
>                 window gets the events and clicking outside the dialog (other \
>                 screen) closes it.
> * API is difficult to use due to having to set BypassWindowManagerHints and \
> Qt.Popup 
> so what I want to do, is adding properties:
> * grabMouse
> * grabKeyboard
> 
> grabMouse will create a fullscreen input window just like the effects and \
> grabKeyboard uses our normal grab functionality. From events.cpp I would then \
> multicast the events into all currently visible windows. I just don't think we \
> could extend the Plasma API to fit those needs.

> I just don't think we could extend the Plasma API to fit those needs.
Well, Marco will have to answer that one ;-)

I'd suspect sth. similar would be required for the dashboard and there's also the \
Homerun launcher (which also has a transparent background)

Don't get me wrong, but i'd rather try to get this fixed "upstream" because otherwise \
we'll never end getting bug reports from script authors trying to invoke Plasma.* (-> \
abort()) or drifting/running after *cough* last minute changes *cough* for alignment \
...


- Thomas


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/109778/#review30006
-----------------------------------------------------------


On March 28, 2013, 3:17 p.m., Martin Gräßlin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/109778/
> -----------------------------------------------------------
> 
> (Updated March 28, 2013, 3:17 p.m.)
> 
> 
> Review request for kwin and Marco Martin.
> 
> 
> Description
> -------
> 
> Use KWin.Window instead of Plasma.Dialog in DesktopChange OSD
> 
> 
> Introduce a WindowDeclarativeItem
> 
> This Item is exported as "Window" to declarative scripts. It can be used
> to create an override-redirect window, similar to what Plasma.Dialog
> provides, but better tailored towards the needs of KWin.
> 
> The WindowDeclarativeItem wraps and controls a QGraphicsView and adds the
> mainItem to its scene. The GraphicsView takes care of rendering a plasma
> styled background (dialogs/background) with the required hacks to ensure
> that KWin gets the correct translucent elements. Shadow is currently not
> yet provided - this should be added in an internal way without the X
> roundtrips.
> 
> Remove QDeclarativeView from DeclarativeScript
> 
> The view is never shown or used in any way except to create the
> QDeclarativeEngine. So instead of using a view as a wrapper, let's create
> a QDeclarativeEngine and a Component and create the script from the
> Component.
> 
> To have Plasma.Dialog working we also need to add the created script item
> to a QGraphicsScene.
> 
> 
> Diffs
> -----
> 
> kwin/CMakeLists.txt f0795b4873ac58a06c737b200559fa76e3c9c11e 
> kwin/scripting/scripting.h db85e23663e475af155235cac6851ef0c5767dc9 
> kwin/scripting/scripting.cpp e124827174317ab6adbfdb90cec796a02e7bd2b7 
> kwin/scripting/windowdeclarativeitem.h PRE-CREATION 
> kwin/scripting/windowdeclarativeitem.cpp PRE-CREATION 
> kwin/scripts/desktopchangeosd/contents/ui/osd.qml \
> af49d45a30fcc6082e181971c1965e35763cf406  
> Diff: http://git.reviewboard.kde.org/r/109778/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Martin Gräßlin
> 
> 


[Attachment #5 (text/html)]

<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;">  <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="http://git.reviewboard.kde.org/r/109778/">http://git.reviewboard.kde.org/r/109778/</a>
  </td>
    </tr>
   </table>
   <br />





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <p style="margin-top: 0;">On March 28th, 2013, 3:33 p.m. UTC, <b>Thomas \
Lübking</b> wrote:</p>  <blockquote style="margin-left: 1em; border-left: 2px solid \
#d0d0d0; padding-left: 10px;">  <pre style="white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Given with esp. QML the shadows can already be part of the window - what \
makes this different from Plasma.Dialog other than the bypass windows hint?

Ie. what&#39;s worth risking to dip into some sort of forked API for kwin only (which \
actually backrefs plasma, so RazorQt is not an argument ;-)

As for the bypass requirement, my initial thought after Michail came up with that for \
the second time was to just add an abort() into events.cpp or maybe deny management \
and push out an error message instead.</pre>  </blockquote>




 <p>On March 28th, 2013, 4:18 p.m. UTC, <b>Martin Gräßlin</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">ah the \
shadows/translucency is not the reason I did this. That&#39;s more a lucky side \
effect.

The things I did this for are not yet implemented. When playing with &quot;Present \
                Windows 2&quot; I noticed the following issues with PlasmaCore \
                Dialog:
* it honors panels - good for Plasma, bad for us
* it cannot be set to not have a background (we will need that if we want to have \
                transitions from current window positions)
* using Qt.Popup to get mouse/keyboard breaks with multi screen. Only one of the \
                window gets the events and clicking outside the dialog (other screen) \
                closes it.
* API is difficult to use due to having to set BypassWindowManagerHints and Qt.Popup

so what I want to do, is adding properties:
* grabMouse
* grabKeyboard

grabMouse will create a fullscreen input window just like the effects and \
grabKeyboard uses our normal grab functionality. From events.cpp I would then \
multicast the events into all currently visible windows. I just don&#39;t think we \
could extend the Plasma API to fit those needs.</pre>  </blockquote>








</blockquote>

<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">&gt; I just don&#39;t \
think we could extend the Plasma API to fit those needs. Well, Marco will have to \
answer that one ;-)

I&#39;d suspect sth. similar would be required for the dashboard and there&#39;s also \
the Homerun launcher (which also has a transparent background)

Don&#39;t get me wrong, but i&#39;d rather try to get this fixed &quot;upstream&quot; \
because otherwise we&#39;ll never end getting bug reports from script authors trying \
to invoke Plasma.* (-&gt; abort()) or drifting/running after *cough* last minute \
changes *cough* for alignment ...</pre> <br />










<p>- Thomas</p>


<br />
<p>On March 28th, 2013, 3:17 p.m. UTC, Martin Gräßlin wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;">  <tr>
  <td>

<div>Review request for kwin and Marco Martin.</div>
<div>By Martin Gräßlin.</div>


<p style="color: grey;"><i>Updated March 28, 2013, 3:17 p.m.</i></p>






<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Use KWin.Window instead of Plasma.Dialog in DesktopChange OSD


Introduce a WindowDeclarativeItem

This Item is exported as &quot;Window&quot; to declarative scripts. It can be used
to create an override-redirect window, similar to what Plasma.Dialog
provides, but better tailored towards the needs of KWin.

The WindowDeclarativeItem wraps and controls a QGraphicsView and adds the
mainItem to its scene. The GraphicsView takes care of rendering a plasma
styled background (dialogs/background) with the required hacks to ensure
that KWin gets the correct translucent elements. Shadow is currently not
yet provided - this should be added in an internal way without the X
roundtrips.

Remove QDeclarativeView from DeclarativeScript

The view is never shown or used in any way except to create the
QDeclarativeEngine. So instead of using a view as a wrapper, let&#39;s create
a QDeclarativeEngine and a Component and create the script from the
Component.

To have Plasma.Dialog working we also need to add the created script item
to a QGraphicsScene.</pre>
  </td>
 </tr>
</table>





<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>kwin/CMakeLists.txt <span style="color: \
grey">(f0795b4873ac58a06c737b200559fa76e3c9c11e)</span></li>

 <li>kwin/scripting/scripting.h <span style="color: \
grey">(db85e23663e475af155235cac6851ef0c5767dc9)</span></li>

 <li>kwin/scripting/scripting.cpp <span style="color: \
grey">(e124827174317ab6adbfdb90cec796a02e7bd2b7)</span></li>

 <li>kwin/scripting/windowdeclarativeitem.h <span style="color: \
grey">(PRE-CREATION)</span></li>

 <li>kwin/scripting/windowdeclarativeitem.cpp <span style="color: \
grey">(PRE-CREATION)</span></li>

 <li>kwin/scripts/desktopchangeosd/contents/ui/osd.qml <span style="color: \
grey">(af49d45a30fcc6082e181971c1965e35763cf406)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/109778/diff/" style="margin-left: \
3em;">View Diff</a></p>







  </td>
 </tr>
</table>








  </div>
 </body>
</html>



_______________________________________________
kwin mailing list
kwin@kde.org
https://mail.kde.org/mailman/listinfo/kwin


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic