Viewport fault in netwm.cpp?

Bradley T Hughes bhughes at trolltech.com
Thu Jul 11 11:50:47 BST 2002


On Thursday 11 July 2002 12:34, David Boddie wrote:
> I'm been looking at the viewport support in kdecore/netwm.cpp and found
> that the wrong parameters appear to be passed to the virtual method,
> changeDesktopViewport.
>
> This patch changes some array references so that the viewport origin is
> passed correctly.

The message passed to the event function is invalid.  From 
http://www.freedesktop.org/standards/wm-spec/x105.html:

---------------------------------------------------------------------
3.5. _NET_DESKTOP_VIEWPORT

_NET_DESKTOP_VIEWPORT x, y, CARDINAL[][2]/32

Array of pairs of cardinals that define the top left corner of each 
desktops viewport. For window managers that don't support large desktops, 
this MUST always be set to (0,0). 

A Pager can request to change the viewport for the current desktop by 
sending a _NET_DESKTOP_VIEWPORT client message to the root window: 

_NET_DESKTOP_VIEWPORT
  message_type = _NET_DESKTOP_VIEWPORT
  format = 32
  data.l[0] = new_vx
  data.l[1] = new_vy

The Window Manager MAY choose to ignore this message, in which case 
_NET_DESKTOP_VIEWPORT property will remain unchanged. 
---------------------------------------------------------------------

The patch you attached is incorrect, and the originator of the viewport 
message needs to be fixed instead.

> On a related subject, can someone explain why there isn't there a signal
> in the KWinModule class for changes to the viewport?
>
> David
>
> ________________________________________________________________________
> This email has been scanned for all viruses by the MessageLabs SkyScan
> service. For more information on a proactive anti-virus service working
> around the clock, around the globe, visit http://www.messagelabs.com
> ________________________________________________________________________

-- 
Bradley T. Hughes - bhughes at trolltech.com
Trolltech AS - Waldemar Thranes gt. 98 N-0175 Oslo, Norway





More information about the kde-core-devel mailing list