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

List:       kde-hardware-devel
Subject:    Re: [Kde-hardware-devel] Review Request: Fix libkscreen when running with old RandR (1.1)
From:       Àlex_Fiestas <afiestas () kde ! org>
Date:       2012-12-30 18:26:51
Message-ID: 20121230182651.18584.72356 () vidsolbach ! de
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


> On Dec. 30, 2012, 5:25 p.m., Dan Vr=C3=A1til wrote:
> > XRandR 1.1 only supports single screen via XRRGetScreenInfo(). Maybe we=
 should fallback to this in order to obtain at least the basic information =
about mode and rotation and switch libkscreen to read-only mode?
> > =

> > http://cgit.freedesktop.org/xorg/proto/randrproto/tree/randrproto.txt#n=
499

Well, we have been waiting for a usecase to support XRandR 1.1 and it seems=
 we have found one (vnc). Imho we should implement support for it in both k=
screen and libkscreen shouldn't be that difficult after all.


- =C3=80lex


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


On Dec. 30, 2012, 5:03 p.m., Luk=C3=A1=C5=A1 Karas wrote:
> =

> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/108030/
> -----------------------------------------------------------
> =

> (Updated Dec. 30, 2012, 5:03 p.m.)
> =

> =

> Review request for Solid, =C3=80lex Fiestas and Dan Vr=C3=A1til.
> =

> =

> Description
> -------
> =

> If you are using libkscreen with old RandR (1.1) method XRandR::screenRes=
ources() returns NULL. It is needed check this result and prevent dereferen=
ce NULL pointer.
> =

> For example if you running KDED in VNC server with RandR 1.1, you get som=
ething like this:
> =

> RandR version 1.1 too old
> ...
> X Error: BadRequest (invalid request code or no such operation) 1
>   Extension:    149 (RANDR)
>   Minor opcode: 6 (RRGetScreenSizeRange)
>   Resource id:  0x2e
> =

> and emtpy list of outputs...
> =

> =

> Diffs
> -----
> =

>   backends/xrandr/xrandr.cpp 468c8dd =

>   backends/xrandr/xrandrconfig.cpp 91467d7 =

> =

> Diff: http://git.reviewboard.kde.org/r/108030/diff/
> =

> =

> Testing
> -------
> =

> =

> Thanks,
> =

> Luk=C3=A1=C5=A1 Karas
> =

>


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





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <p style="margin-top: 0;">On December 30th, 2012, 5:25 p.m., <b>Dan \
Vrátil</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;">XRandR 1.1 only supports single screen via XRRGetScreenInfo(). Maybe we \
should fallback to this in order to obtain at least the basic information about mode \
and rotation and switch libkscreen to read-only mode?

http://cgit.freedesktop.org/xorg/proto/randrproto/tree/randrproto.txt#n499</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;">Well, we have been \
waiting for a usecase to support XRandR 1.1 and it seems we have found one (vnc). \
Imho we should implement support for it in both kscreen and libkscreen shouldn&#39;t \
be that difficult after all.</pre> <br />








<p>- Àlex</p>


<br />
<p>On December 30th, 2012, 5:03 p.m., Lukáš Karas wrote:</p>






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

<div>Review request for Solid, Àlex Fiestas and Dan Vrátil.</div>
<div>By Lukáš Karas.</div>


<p style="color: grey;"><i>Updated Dec. 30, 2012, 5:03 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;">If you are using libkscreen with old RandR (1.1) method \
XRandR::screenResources() returns NULL. It is needed check this result and prevent \
dereference NULL pointer.

For example if you running KDED in VNC server with RandR 1.1, you get something like \
this:

RandR version 1.1 too old
...
X Error: BadRequest (invalid request code or no such operation) 1
  Extension:    149 (RANDR)
  Minor opcode: 6 (RRGetScreenSizeRange)
  Resource id:  0x2e

and emtpy list of outputs...</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>backends/xrandr/xrandr.cpp <span style="color: grey">(468c8dd)</span></li>

 <li>backends/xrandr/xrandrconfig.cpp <span style="color: grey">(91467d7)</span></li>

</ul>

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




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








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



_______________________________________________
Kde-hardware-devel mailing list
Kde-hardware-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-hardware-devel


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

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