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

List:       kwin
Subject:    Re: Review Request 115334: Make KWin place the OSD
From:       "Martin Klapetek" <martin.klapetek () gmail ! com>
Date:       2014-01-28 13:47:49
Message-ID: 20140128134749.5775.5133 () probe ! kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


> On Jan. 28, 2014, 2:32 p.m., Thomas Lübking wrote:
> > kwin/placement.cpp, line 494
> > <https://git.reviewboard.kde.org/r/115334/diff/1/?file=240729#file240729line494>
> > 
> > This will undercut the result while DIV systematically undercuts anyway
> > 
> > 8/3 * 2 = 4
> > 8*2 / 3 = 5
> > 8.0*2/3 = 5.33

If I understand your comment correctly, then this is only a problem for very small \
values, isn't it? If you have a resolution of at least 800x600, it would be

600/3 * 2 = 400
600*2 / 3 = 400
600.0*2/3 = 400

Anyways, if you have a difference of 1 pixel, I think that's within the error \
maring...IOW, you couldn't tell on the screen anyway ;)


- Martin


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115334/#review48425
-----------------------------------------------------------


On Jan. 27, 2014, 5:51 p.m., Martin Klapetek wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/115334/
> -----------------------------------------------------------
> 
> (Updated Jan. 27, 2014, 5:51 p.m.)
> 
> 
> Review request for kwin.
> 
> 
> Repository: kde-workspace
> 
> 
> Description
> -------
> 
> Adds a method for placing the OSD window. Currently it simply places it at the \
> lower 2/3 of the screen, has no support yet for staying at a particular screen \
> (like brightness OSD always staying at the controlled screen). Martin said he does \
> not want that in KWin, which I understand, but I'm unsure how else to do it if KWin \
> will do the positioning. Ideas? 
> 
> Diffs
> -----
> 
> kwin/placement.cpp 8534f81 
> kwin/placement.h 7c943ff 
> 
> Diff: https://git.reviewboard.kde.org/r/115334/diff/
> 
> 
> Testing
> -------
> 
> OSD appears where it should.
> 
> 
> Thanks,
> 
> Martin Klapetek
> 
> 


[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="https://git.reviewboard.kde.org/r/115334/">https://git.reviewboard.kde.org/r/115334/</a>
  </td>
    </tr>
   </table>
   <br />










<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <p style="margin-top: 0;">On January 28th, 2014, 2:32 p.m. CET, <b>Thomas \
Lübking</b> wrote:</p>  <blockquote style="margin-left: 1em; border-left: 2px solid \
#d0d0d0; padding-left: 10px;">  



<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;">  <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;">  <a \
href="https://git.reviewboard.kde.org/r/115334/diff/1/?file=240729#file240729line494" \
style="color: black; font-weight: bold; text-decoration: \
underline;">kwin/placement.cpp</a>  <span style="font-weight: normal;">

     (Diff revision 1)

    </span>
   </th>
  </tr>
 </thead>



 
 

 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2"></font></th>  <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">494</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="k">const</span> <span class="kt">int</span> <span class="n">y</span> <span \
class="o">=</span> <span class="p">(</span><span class="n">maxRect</span><span \
class="p">.</span><span class="n">top</span><span class="p">()</span>  <span \
class="o">+</span> <span class="p">(</span><span class="n">maxRect</span><span \
class="p">.</span><span class="n">height</span><span class="p">()</span> <span \
class="o">-</span> <span class="n">c</span><span class="o">-&gt;</span><span \
class="n">height</span><span class="p">())</span> <span class="o">/</span> <span \
class="mi">3</span><span class="p">)</span> <span class="o">*</span> <span \
class="mi">2</span><span class="p">;</span></pre></td>  </tr>

 </tbody>

</table>

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">This will undercut the \
result while DIV systematically undercuts anyway

8/3 * 2 = 4
8*2 / 3 = 5
8.0*2/3 = 5.33</pre>
 </blockquote>





</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">If I \
understand your comment correctly, then this is only a problem for very small values, \
isn&#39;t it? If you have a resolution of at least 800x600, it would be

600/3 * 2 = 400
600*2 / 3 = 400
600.0*2/3 = 400

Anyways, if you have a difference of 1 pixel, I think that&#39;s within the error \
maring...IOW, you couldn&#39;t tell on the screen anyway ;)</pre> <br />




<p>- Martin</p>


<br />
<p>On January 27th, 2014, 5:51 p.m. CET, Martin Klapetek wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('https://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.</div>
<div>By Martin Klapetek.</div>


<p style="color: grey;"><i>Updated Jan. 27, 2014, 5:51 p.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
kde-workspace
</div>


<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;">Adds a method for placing the OSD window. Currently it simply places it \
at the lower 2/3 of the screen, has no support yet for staying at a particular screen \
(like brightness OSD always staying at the controlled screen). Martin said he does \
not want that in KWin, which I understand, but I&#39;m unsure how else to do it if \
KWin will do the positioning. Ideas?</pre>  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </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;">OSD appears where it should.</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/placement.cpp <span style="color: grey">(8534f81)</span></li>

 <li>kwin/placement.h <span style="color: grey">(7c943ff)</span></li>

</ul>

<p><a href="https://git.reviewboard.kde.org/r/115334/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