RE: [BLACKBOX] /NOSCROLL and Wine

From: null <">
Date: Tue, 12 May 2009 13:11:44 +0000

----boundary-LibPST-iamunique-98679563_-_-
Content-type: text/plain

Hi,

I glanced over the bug description you gave
http://bugs.winehq.org/show_bug.cgi?id=9453 but I have slight
problems to understand it.

Going into the source of BlackBox, I found in HostWindows:

IF noClientScroll THEN
        client := WinApi.CreateWindowExW({}, "MDICLIENT", NIL,
                                        {25, 30}, (* clipchildren, child *)
                                        0, 0, 0, 0,
                                        main, 32767, instance, SYSTEM.ADR(ccs))
  ELSE
        client := WinApi.CreateWindowExW({}, "MDICLIENT", NIL,
                                        {20, 21, 25, 30}, (* scroll, clipchildren, child *)
                                        0, 0, 0, 0,
                                        main, 32767, instance, SYSTEM.ADR(ccs))
END;

which implies to me that Wine does not handle the options correctly,
but with the patch it does. Shouldn't we reopen the Wine bug with
a better description of the problem?

regards
--
  Bernhard 
  e-mail: bernhard treutwein (at) verwaltung uni-muenchen de (work)
          bernhard (at) wildwein de (home)
 
> -----Original Message-----
> From: BlackBox [mailto:BLACKBOX{([at]})nowhere.xy> adimetrius{([at]})nowhere.xy> Sent: Tuesday, May 12, 2009 7:51 AM
> To: BLACKBOX{([at]})nowhere.xy> Subject: [BLACKBOX] /NOSCROLL and Wine
> 
> 
> Hi all,
> 
> i am using BB under wine, and the /NOSCROLL command line 
> option didn't work for me: i would always get scroll bars 
> when a window was moved beyond main client area. Under 
> Windows, this was not the case: the /NOSCROLL works just fine.
> 
> Recently i found a bug fix for Wine that solves the problem. 
> It's discussion can be found here:
> http://bugs.winehq.org/show_bug.cgi?id=9453
> 
> For convenience, i will post the patch itself at the end of 
> this email.
> 
> To apply it, you will need wine source code, of course, then 
> apply the patch file to mdi.c in the source tree (unless in 
> your version it is already included), then:
> IF you haven't built wine before THEN
>    build wine with "make && make install" or following 
> insructions in README
> ELSIF you have the file mdi.o (* from a previous build *) THEN
>    remove or rename mdi.o
>    from wine source root run "make". 
> 	(* this will make a new version of user32.dll.so in the 
> source tree *)
>    locate "user32.dll.so" in your local filesystem
>    replace the "user32.dll.so" in your local filesystem with 
> the newly make'd 
> user32.dll.so"
> END
> 
> Restart BB and enjoy!
> 
> Here is the patch:
> ----------------------------------------------------
> Index: mdi.c
> ===================================================================
> --- mdi.c	(revision 12767)
> +++ mdi.c	(arbetskopia)
> {([at]})nowhere.xy>      UINT      nTotalCreated;
>      UINT      mdiFlags;
>      UINT      sbRecalc;   /* SB_xxx flags for scrollbar fixup */
> +    DWORD     initialStyle; /* Style when window was created */
>  } MDICLIENTINFO;
>  
>  static HBITMAP hBmpClose   = 0;
> {([at]})nowhere.xy>  	ci->nTotalCreated	= 0;
>  	ci->frameTitle		= NULL;
>  	ci->mdiFlags		= 0;
> +	ci->initialStyle        = cs->style;
>          ci->hFrameMenu = GetMenu(cs->hwndParent);
>  
>  	if (!hBmpClose) hBmpClose = CreateMDIMenuBitmap();
> {([at]})nowhere.xy>      SCROLLINFO info;
>      RECT childRect, clientRect;
>      HWND *list;
> +    MDICLIENTINFO *ci;
>  
> +    ci = get_client_info(hwnd);
>      GetClientRect( hwnd, &clientRect );
>      SetRectEmpty( &childRect );
>  
> {([at]})nowhere.xy>  			info.nMin = childRect.left;
>  			info.nMax = childRect.right - clientRect.right;
>  			info.nPos = clientRect.left - childRect.left;
> -			SetScrollInfo(hwnd, SB_HORZ, &info, TRUE);
> +			if (ci->initialStyle & WS_HSCROLL)
> +			    SetScrollInfo(hwnd, SB_HORZ, &info, TRUE);
>  			if (scroll == SB_HORZ) break;
>  			/* fall through */
>  	case SB_VERT:
>  			info.nMin = childRect.top;
>  			info.nMax = childRect.bottom - 
> clientRect.bottom;
>  			info.nPos = clientRect.top - childRect.top;
> -			SetScrollInfo(hwnd, SB_VERT, &info, TRUE);
> +			if (ci->initialStyle & WS_VSCROLL)
> +			    SetScrollInfo(hwnd, SB_VERT, &info, TRUE);
>  			break;
>      }
>  }
> 
> 
> ----
> To unsubscribe, send a message with body "SIGNOFF BLACKBOX" 
> to LISTSERV{([at]})nowhere.xy> 
----boundary-LibPST-iamunique-98679563_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxhaW5cZGVmdGFiMzYwIFxmMFxmczIwIEhpLFxwYXINClxwYXINCkkgZ2xhbmNlZCBvdmVy
IHRoZSBidWcgZGVzY3JpcHRpb24geW91IGdhdmVccGFyDQpodHRwOi8vYnVncy53aW5laHEub3Jn
L3Nob3dfYnVnLmNnaT9pZD05NDUzIGJ1dCBJIGhhdmUgc2xpZ2h0XHBhcg0KcHJvYmxlbXMgdG8g
dW5kZXJzdGFuZCBpdC5ccGFyDQpccGFyDQpHb2luZyBpbnRvIHRoZSBzb3VyY2Ugb2YgQmxhY2tC
b3gsIEkgZm91bmQgaW4gSG9zdFdpbmRvd3M6XHBhcg0KXHBhcg0KSUYgbm9DbGllbnRTY3JvbGwg
VEhFTlxwYXINClx0YWIgY2xpZW50IDo9IFdpbkFwaS5DcmVhdGVXaW5kb3dFeFcoXHtcfSwgIk1E
SUNMSUVOVCIsIE5JTCxccGFyDQpcdGFiIFx0YWIgXHRhYiBcdGFiIFx0YWIgXHsyNSwgMzBcfSxc
dGFiICgqIGNsaXBjaGlsZHJlbiwgY2hpbGQgKilccGFyDQpcdGFiIFx0YWIgXHRhYiBcdGFiIFx0
YWIgMCwgMCwgMCwgMCxccGFyDQpcdGFiIF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
cGFyDQo+ICBcdGFiIFx0YWIgXHRhYiBpZiAoc2Nyb2xsID09IFNCX0hPUlopIGJyZWFrO1xwYXIN
Cj4gIFx0YWIgXHRhYiBcdGFiIC8qIGZhbGwgdGhyb3VnaCAqL1xwYXINCj4gIFx0YWIgY2FzZSBT
Ql9WRVJUOlxwYXINCj4gIFx0YWIgXHRhYiBcdGFiIGluZm8ubk1pbiA9IGNoaWxkUmVjdC50b3A7
XHBhcg0KPiAgXHRhYiBcdGFiIFx0YWIgaW5mby5uTWF4ID0gY2hpbGRSZWN0LmJvdHRvbSAtIFxw
YXINCj4gY2xpZW50UmVjdC5ib3R0b207XHBhcg0KPiAgXHRhYiBcdGFiIFx0YWIgaW5mby5uUG9z
ID0gY2xpZW50UmVjdC50b3AgLSBjaGlsZFJlY3QudG9wO1xwYXINCj4gLVx0YWIgXHRhYiBcdGFi
IFNldFNjcm9sbEluZm8oaHduZCwgU0JfVkVSVCwgJmluZm8sIFRSVUUpO1xwYXINCj4gK1x0YWIg
XHRhYiBcdGFiIGlmIChjaS0+aW5pdGlhbFN0eWxlICYgV1NfVlNDUk9MTClccGFyDQo+ICtcdGFi
IFx0YWIgXHRhYiAgICAgU2V0U2Nyb2xsSW5mbyhod25kLCBTQl9WRVJULCAmaW5mbywgVFJVRSk7
XHBhcg0KPiAgXHRhYiBcdGFiIFx0YWIgYnJlYWs7XHBhcg0KPiAgICAgIFx9XHBhcg0KPiAgXH1c
cGFyDQo+IFxwYXINCj4gXHBhcg0KPiAtLS0tXHBhcg0KPiBUbyB1bnN1YnNjcmliZSwgc2VuZCBh
IG1lc3NhZ2Ugd2l0aCBib2R5ICJTSUdOT0ZGIEJMQUNLQk9YIiBccGFyDQo+IHRvIExJU1RTRVJW
QExJU1RTLk9CRVJPTi5DSFx9fQA3IPBTmbBU0Avg6w==
----boundary-LibPST-iamunique-98679563_-_---
Received on Tue May 12 2009 - 15:11:44 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:30:47 UTC