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

List:       kde-panel-devel
Subject:    D7246: Tooltips
From:       Martin_Flöser <noreply () phabricator ! kde ! org>
Date:       2017-11-25 18:19:41
Message-ID: 20171125181940.31073.C55EF465ADC171FE () phabricator ! kde ! org
[Download RAW message or body]

graesslin added a comment.


  In https://phabricator.kde.org/D7246#171908, @graesslin wrote:
  
  > I'm sorry, but Widgets is a dependency which cannot be used for it. This creates \
problems in KWin. Tooltip support must be implemented directly in KWin, exposed \
through the KDecoration API. Yes I know that makes it rather complex, but that's the \
reason why tooltip support wasn't added to KDecoration through QWidget in the first \
place.  
  
  I thought a little bit more about it. It might be possible to use QWidgets if it's \
done inside KWin. That might work correctly. If it's not directly controlled by KWin, \
it's problematic and will most likely not work correctly. To explain: KWin has \
difficulties creating windows. I know it sounds stupid, that the window manager is \
not able to create windows, but that's how it is. KWin has to do quite some tricks \
and track windows internally. If a window gets created by a library loaded into KWin \
and KWin doesn't know about it, such internal tracking breaks. It now has a window it \
doesn't know about. That's especially a problem on Wayland, on X11 it works better \
for windows such as a tooltip.  
  But long story short: for KWin the best is a request from KDecoration \
"showTooltip(const QString &)" and KWin creates the tooltip window, positions it and \
ensures it works correctly.

REPOSITORY
  R129 Window Decoration Library

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

To: McPain, #breeze, #plasma, graesslin
Cc: ngraham, broulik, plasma-devel, #breeze, ZrenBot, progwolff, lesliezhai, \
ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


[Attachment #3 (unknown)]

<table><tr><td style="">graesslin added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: \
right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: \
#F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: \
inline-block; border: 1px solid rgba(71,87,120,.2);" \
href="https://phabricator.kde.org/D7246" rel="noreferrer">View \
Revision</a></tr></table><br /><div><div><blockquote style="border-left: 3px solid \
#8C98B8;  color: #6B748C;
          font-style: italic;
          margin: 4px 0 12px 0;
          padding: 8px 12px;
          background-color: #F8F9FC;">
<div style="font-style: normal;
          padding-bottom: 4px;">In <a href="https://phabricator.kde.org/D7246#171908" \
style="background-color: #e7e7e7;  border-color: #e7e7e7;
          border-radius: 3px;
          padding: 0 4px;
          font-weight: bold;
          color: black;text-decoration: none;" rel="noreferrer">D7246#171908</a>, <a \
href="https://phabricator.kde.org/p/graesslin/" style="  border-color: #f1f7ff;
              color: #19558d;
              background-color: #f1f7ff;
                border: 1px solid transparent;
                border-radius: 3px;
                font-weight: bold;
                padding: 0 4px;" rel="noreferrer">@graesslin</a> wrote:</div>
<div style="margin: 0;
          padding: 0;
          border: 0;
          color: rgb(107, 116, 140);"><p>I&#039;m sorry, but Widgets is a dependency \
which cannot be used for it. This creates problems in KWin. Tooltip support must be \
implemented directly in KWin, exposed through the KDecoration API. Yes I know that \
makes it rather complex, but that&#039;s the reason why tooltip support wasn&#039;t \
added to KDecoration through QWidget in the first place.</p></div> </blockquote>

<p>I thought a little bit more about it. It might be possible to use QWidgets if \
it&#039;s done inside KWin. That might work correctly. If it&#039;s not directly \
controlled by KWin, it&#039;s problematic and will most likely not work correctly. To \
explain: KWin has difficulties creating windows. I know it sounds stupid, that the \
window manager is not able to create windows, but that&#039;s how it is. KWin has to \
do quite some tricks and track windows internally. If a window gets created by a \
library loaded into KWin and KWin doesn&#039;t know about it, such internal tracking \
breaks. It now has a window it doesn&#039;t know about. That&#039;s especially a \
problem on Wayland, on X11 it works better for windows such as a tooltip.</p>

<p>But long story short: for KWin the best is a request from KDecoration \
&quot;showTooltip(const QString &amp;)&quot; and KWin creates the tooltip window, \
positions it and ensures it works correctly.</p></div></div><br \
/><div><strong>REPOSITORY</strong><div><div>R129 Window Decoration \
Library</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a \
href="https://phabricator.kde.org/D7246" \
rel="noreferrer">https://phabricator.kde.org/D7246</a></div></div><br \
/><div><strong>To: </strong>McPain, Breeze, Plasma, graesslin<br /><strong>Cc: \
</strong>ngraham, broulik, plasma-devel, Breeze, ZrenBot, progwolff, lesliezhai, \
ali-mohamed, jensreuterberg, abetts, sebas, apol, mart<br /></div>



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

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