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

List:       kde-core-devel
Subject:    Re: Review Request 114841: Screenlocker: don't set the mouse cursor when grabbing the mouse
From:       Thomas_Lübking <thomas.luebking () gmail ! com>
Date:       2014-01-07 15:26:24
Message-ID: 20140107152624.7621.92687 () probe ! kde ! org
[Download RAW message or body]

> On Jan. 7, 2014, 8:51 a.m., Martin Gräßlin wrote:
> > how does that behave with the normal locker (that is no screensaver)?

"None" is not "blank" - the patch is correct.

If a cursor is specified, it is displayed regardless of what window the \
pointer is in. If None is specified, the normal cursor for that window is \
displayed when the pointer is in grab_window or one of its subwindows; \
                otherwise, the cursor for grab_window is displayed.
--- http://tronche.com/gui/x/xlib/input/XGrabPointer.html

Since the screenlocker qml window (nor the batterysucking fancy show) is \
not the grab_window, both will initially get the default cursor of the \
grab_window (atm. the left_arrow) and not receive mouse events (so w/ or \
w/o the patch, the qml locker will not display an I-beam when hovering the \
lineedit - at least not here, one would have to poll the mouse for this and \
don't you dare* ;-)

W/o an explicit grab_cursor, it however should be possible (never tested, \
but seems the case given the patch) to alter the cursor shape from other \
clients at any time (because it's not important for the grabbing client)

* unless we make use of http://keithp.com/blogs/Cursor_tracking/ for PW/2


- Thomas


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


On Jan. 5, 2014, 8:55 a.m., Wolfgang Bauer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/114841/
> -----------------------------------------------------------
> 
> (Updated Jan. 5, 2014, 8:55 a.m.)
> 
> 
> Review request for kde-workspace and Martin Gräßlin.
> 
> 
> Bugs: 311571 and 316459
> http://bugs.kde.org/show_bug.cgi?id=311571
> http://bugs.kde.org/show_bug.cgi?id=316459
> 
> 
> Repository: kde-workspace
> 
> 
> Description
> -------
> 
> Setting the cursor to ArrowCursor when calling XGrabPointer() prevents \
> the Screen savers from blanking the mouse cursor. 
> I don't know why this has been done in the first place, but I couldn't \
> see any negative effect by setting it to None. Now the mouse cursor even \
> changes to the IBeam again when over the password field, which I find \
> more intuitive. 
> 
> Diffs
> -----
> 
> ksmserver/screenlocker/ksldapp.cpp f0526cf 
> 
> Diff: https://git.reviewboard.kde.org/r/114841/diff/
> 
> 
> Testing
> -------
> 
> Configure a Screen saver in systemsettings and wait for it to kick in (or \
> lock the screen manually). Previously (since 4.10) the mouse cursor \
> stayed visible, now it is blanked like it was the case before 4.10. \
> Moving the mouse/pressing a key (to quit the Screen saver) makes the \
> mouse cursor appear again as it should, regardless of whether the screen \
> is locked or not. 
> 
> Thanks,
> 
> Wolfgang Bauer
> 
> 


[Attachment #3 (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/114841/">https://git.reviewboard.kde.org/r/114841/</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 7th, 2014, 8:51 \
a.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;">how does that behave with the normal locker (that is no \
screensaver)?</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;">&quot;None&quot; is not &quot;blank&quot; - the patch is \
correct.

If a cursor is specified, it is displayed regardless of what window the \
pointer is in. If None is specified, the normal cursor for that window is \
displayed when the pointer is in grab_window or one of its subwindows; \
                otherwise, the cursor for grab_window is displayed.
--- http://tronche.com/gui/x/xlib/input/XGrabPointer.html

Since the screenlocker qml window (nor the batterysucking fancy show) is \
not the grab_window, both will initially get the default cursor of the \
grab_window (atm. the left_arrow) and not receive mouse events (so w/ or \
w/o the patch, the qml locker will not display an I-beam when hovering the \
lineedit - at least not here, one would have to poll the mouse for this and \
don&#39;t you dare* ;-)

W/o an explicit grab_cursor, it however should be possible (never tested, \
but seems the case given the patch) to alter the cursor shape from other \
clients at any time (because it&#39;s not important for the grabbing \
client)

* unless we make use of http://keithp.com/blogs/Cursor_tracking/ for \
PW/2</pre> <br />










<p>- Thomas</p>


<br />
<p>On January 5th, 2014, 8:55 a.m. UTC, Wolfgang Bauer 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 kde-workspace and Martin Gräßlin.</div>
<div>By Wolfgang Bauer.</div>


<p style="color: grey;"><i>Updated Jan. 5, 2014, 8:55 a.m.</i></p>







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


 <a href="http://bugs.kde.org/show_bug.cgi?id=311571">311571</a>, 

 <a href="http://bugs.kde.org/show_bug.cgi?id=316459">316459</a>


</div>



<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;">Setting the cursor to ArrowCursor when calling XGrabPointer() \
prevents the Screen savers from blanking the mouse cursor.

I don&#39;t know why this has been done in the first place, but I \
couldn&#39;t see any negative effect by setting it to None. Now the mouse \
cursor even changes to the IBeam again when over the password field, which \
I find more intuitive.</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;">Configure a Screen saver in systemsettings and wait for it to \
kick in (or lock the screen manually). Previously (since 4.10) the mouse \
cursor stayed visible, now it is blanked like it was the case before 4.10. \
Moving the mouse/pressing a key (to quit the Screen saver) makes the mouse \
cursor appear again as it should, regardless of whether the screen is \
locked or not.</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>ksmserver/screenlocker/ksldapp.cpp <span style="color: \
grey">(f0526cf)</span></li>

</ul>

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







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








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



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

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