NetBSD Problem Report #53994

From www@NetBSD.org  Tue Feb 19 23:12:56 2019
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id A16557A151
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 19 Feb 2019 23:12:56 +0000 (UTC)
Message-Id: <20190219231255.C05D37A1F0@mollari.NetBSD.org>
Date: Tue, 19 Feb 2019 23:12:55 +0000 (UTC)
From: aran@100acres.us
Reply-To: aran@100acres.us
To: gnats-bugs@NetBSD.org
Subject: libxosd incorectly plasing text with offset monitors
X-Send-Pr-Version: www-1.0

>Number:         53994
>Category:       pkg
>Synopsis:       libxosd incorectly plasing text with offset monitors
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bsiegert
>State:          closed
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Tue Feb 19 23:15:00 +0000 2019
>Closed-Date:    Sat Mar 16 08:51:28 +0000 2019
>Last-Modified:  Sat Mar 16 08:55:01 +0000 2019
>Originator:     Aran Clauson
>Release:        2018Q4
>Organization:
Western Washington University
>Environment:
NetBSD owl 8.99.31 NetBSD 8.99.31 (GENERIC) #0: Wed Jan 23 08:20:24 PST 2019  aran@owl:/home/NetBSD/obj/sys/arch/amd64/compile/GENERIC amd64

>Description:
I have two monitors with the primary monitor with position so the bottoms of both monitors align.  The osd text does not incorporate this position when placing things on the bottom of the screen.  

>How-To-Repeat:
Using xrandr, give the monitor a non-zero y-position.  Use osd_cat to display text at the bottom of the screen.  
>Fix:
--- src/libxosd/intern.h.orig   2019-02-19 22:10:02.161767111 +0000
+++ src/libxosd/intern.h
@@ -107,6 +107,7 @@ struct xosd
   int screen_width;             /* CONST x11 */
   int screen_height;            /* CONST x11 */
   int screen_xpos;              /* CONST x11 */
+  int screen_ypos;              /* CONST x11 */
   int height;                   /* CACHE (font) */
   int line_height;              /* CACHE (font) */
   xosd_pos pos;                 /* CONF */

--- src/libxosd/xosd.c.orig     2019-02-19 22:10:09.535111743 +0000
+++ src/libxosd/xosd.c
@@ -326,13 +326,13 @@ event_loop(void *osdv)
       }
       switch (osd->pos) {
       case XOSD_bottom:
-        y = osd->screen_height - osd->height - osd->voffset;
+        y = osd->screen_height + osd->screen_ypos - osd->height - osd->voffset;
         break;
       case XOSD_middle:
-        y = (osd->screen_height - osd->height) / 2 - osd->voffset;
+        y = (osd->screen_height  + osd->screen_ypos - osd->height) / 2 - osd->voffset;
         break;
       case XOSD_top:
-        y = osd->voffset;
+        y = osd->screen_ypos + osd->voffset;
       }
       XMoveWindow(osd->display, osd->window, x, y);
     }
@@ -746,12 +746,14 @@ xosd_create(int number_lines)
     osd->screen_width = screeninfo[0].width;
     osd->screen_height = screeninfo[0].height;
     osd->screen_xpos = screeninfo[0].x_org;
+    osd->screen_ypos = screeninfo[0].y_org;
   } else
 #endif
   {
     osd->screen_width = XDisplayWidth(osd->display, osd->screen);
     osd->screen_height = XDisplayHeight(osd->display, osd->screen);
     osd->screen_xpos = 0;
+    osd->screen_ypos = 0;
   }
 #ifdef HAVE_XINERAMA
   if (screeninfo)

>Release-Note:

>Audit-Trail:
From: Benny Siegert <bsiegert@gmail.com>
To: gnats-bugs@netbsd.org
Cc: pkg-manager@netbsd.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org
Subject: Re: pkg/53994: libxosd incorectly plasing text with offset monitors
Date: Thu, 28 Feb 2019 15:06:54 +0100

 Thank you for the report! Did you report this upstream too?

From: aran@100acres.us
To: gnats-bugs@NetBSD.org, bsiegert@gmail.com
Cc: pkg-manager@netbsd.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org
Subject: Re: pkg/53994: libxosd incorectly plasing text with offset monitors
Date: Thu, 28 Feb 2019 07:44:10 -0800 (PST)

 ----Security_Multipart(Thu_Feb_28_07_44_10_2019_954)--
 Content-Type: Text/Plain; charset=us-ascii
 Content-Transfer-Encoding: 7bit

 >
 >  Thank you for the report! Did you report this upstream too?
 >
 No, no I have not.  Honestly, I gave up trying to find where to report the
 issue.

 ----Security_Multipart(Thu_Feb_28_07_44_10_2019_954)--
 Content-Type: application/pgp-signature
 Content-Transfer-Encoding: 7bit

 -----BEGIN PGP SIGNATURE-----

 iQIcBAABAgAGBQJceAHKAAoJEFJrS+gzuDYdRwgP/iExUyg3qR4D98f0GD/FcLPI
 CWWN8Ykx2EsGRpWvt1Cb2kTBPP2qlpO/UUI8sfkUcUI9RCpAE0gnc9XHKngdE4wN
 8qwPxMb2Od4t9FEb3t992DI/IbtedX/Kle1l5jpf1NCOt9WlNlxOYdkQZ05ty033
 fSdqrcC6FlnES2ql5xLcqBbjbk/xZufYFnTIFKQJc1PIqj7WKjNwdiVfOwWcPhYb
 ukY/ZOtz7R8SbMucsGN61Sz3DyV89qFO/g4AJbU18z93zG9wjQliXtorn3FKBBM+
 tDJAHUGbMjZ9DVyV/fOyZxxh1v20OEgKLWlXjfC/qAe4hGkAtZeS0nudTdyX4Ne1
 xYVmxcUpUp59I/feTlgk/N8zyE52cMMFmALB0/sPt2AxPb3En7egzn5WNG2Um805
 4edykSSyhPW0x4UbcM3rOjsAWkgDuSNlzSN2qGyvMB3qucYp+P7+uwZGapHoNNVa
 v6uDUWBjFtFXHF7J0tfDn/DNa5YU7SuFhZ50zSXQ0pr+HExvNxtncwZUDKcncVzl
 YHCe4BxyjJbBQo//NUAFchAA9UZ9s+rJg+/Ftv6sqoZF3V6KNlcqrc4CZ2Ra2wMV
 k9QFxfNC3KzqnZYOTLufy2mvn7ZqVeVAWXCRN/GKHqXhP9GYE9FWofOrbyl5g3aJ
 FFdVmUbXazXKYAEWLCQX
 =weDC
 -----END PGP SIGNATURE-----

 ----Security_Multipart(Thu_Feb_28_07_44_10_2019_954)----

Responsible-Changed-From-To: pkg-manager->bsiegert
Responsible-Changed-By: bsiegert@NetBSD.org
Responsible-Changed-When: Sat, 16 Mar 2019 08:51:28 +0000
Responsible-Changed-Why:
take


State-Changed-From-To: open->closed
State-Changed-By: bsiegert@NetBSD.org
State-Changed-When: Sat, 16 Mar 2019 08:51:28 +0000
State-Changed-Why:
Patch applied, thanks!


From: "Benny Siegert" <bsiegert@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/53994 CVS commit: pkgsrc/x11/xosd
Date: Sat, 16 Mar 2019 08:50:48 +0000

 Module Name:	pkgsrc
 Committed By:	bsiegert
 Date:		Sat Mar 16 08:50:48 UTC 2019

 Modified Files:
 	pkgsrc/x11/xosd: Makefile distinfo
 Added Files:
 	pkgsrc/x11/xosd/patches: patch-src_libxosd_intern.h
 	    patch-src_libxosd_xosd.c

 Log Message:
 xosd: place text correctly when using offset monitors.

 From Aran Clauson in PR pkg/53994. Upstream seems dead.


 To generate a diff of this commit:
 cvs rdiff -u -r1.13 -r1.14 pkgsrc/x11/xosd/Makefile
 cvs rdiff -u -r1.14 -r1.15 pkgsrc/x11/xosd/distinfo
 cvs rdiff -u -r0 -r1.1 pkgsrc/x11/xosd/patches/patch-src_libxosd_intern.h \
     pkgsrc/x11/xosd/patches/patch-src_libxosd_xosd.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.