From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17631 invoked by alias); 19 Jun 2014 12:22:53 -0000 Mailing-List: contact cygwin-xfree-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-xfree-owner@cygwin.com Reply-To: cygwin-xfree@cygwin.com Mail-Followup-To: cygwin-xfree@cygwin.com Received: (qmail 17621 invoked by uid 89); 19 Jun 2014 12:22:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.7 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mout.gmx.net Received: from mout.gmx.net (HELO mout.gmx.net) (212.227.15.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 19 Jun 2014 12:22:50 +0000 Received: from [192.168.103.50] ([145.253.186.130]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0MX16a-1XBqSp1HXw-00W1q6 for ; Thu, 19 Jun 2014 14:22:47 +0200 Message-ID: <53A2D616.4020605@gmx.de> Date: Thu, 19 Jun 2014 12:22:00 -0000 From: Oliver Schmidt User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: cygwin-xfree@cygwin.com Subject: problem evaluating window resize hints under 64 bit Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2014-06/txt/msg00015.txt.bz2 The current cygwin x server 1.15.1-2 under 64-bit cygwin seems to have a problem correctly evaluating the window resize hints. In hw/xwin/winmultiwindowwndproc.c the function ValidateSizing calls winMultiWindowGetWMNormalHints and gets wrong values in sizeHints.width_inc and sizeHints.height_inc. In function winMultiWindowGetWMNormalHints in file hw/xwin/winmultiwindowclass.c you can see that a memcpy occurs from prop->data with sizeof(WinXSizeHints). As it turns out, everything is correct if you modify the typedef of WinXSizeHints in hw/xwin/winmultiwindowclass.h so that long type becomes int: --- a/cygwin/hw/xwin/winmultiwindowclass.h +++ b/cygwin/hw/xwin/winmultiwindowclass.h @@ -63,7 +63,7 @@ typedef struct { * used with WM_NORMAL_HINTS. */ typedef struct { - long flags; /* marks which fields in this structure are defined */ + int flags; /* marks which fields in this structure are defined */ int x, y; /* obsolete for new window mgrs, but clients */ int width, height; /* should set so old wm's don't mess up */ I can only guess why this works: in the X11 message protocol all int and long types are mapped to 32 bit integers. It seems that the memcpy in winMultiWindowGetWMNormalHints has source data that has memory layout as in the X11 message protocol. Best regards, Oliver -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://x.cygwin.com/docs/ FAQ: http://x.cygwin.com/docs/faq/