[BLACKBOX] /NOSCROLL and Wine

From: (wrong string) Антон Π”ΠΌΠΈΡ‚Ρ€ΠΈΠ΅Π² <adimetrius{([at]})nowhere.xy>
Date: Tue, 12 May 2009 09:50:44 +0400

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

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-2094591821_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxhaW5cZGVmdGFiMzYwIFxmMFxmczIwIEhpIGFsbCxccGFyDQpccGFyDQppIGFtIHVzaW5n
IEJCIHVuZGVyIHdpbmUsIGFuZCB0aGUgL05PU0NST0xMIGNvbW1hbmQgbGluZSBvcHRpb24gZGlk
bid0IHdvcmsgXHBhcg0KZm9yIG1lOiBpIHdvdWxkIGFsd2F5cyBnZXQgc2Nyb2xsIGJhcnMgd2hl
biBhIHdpbmRvdyB3YXMgbW92ZWQgYmV5b25kIG1haW4g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0tLVxwYXINClRvIHVuc3Vic2NyaWJlLCBzZW5kIGEgbWVz
c2FnZSB3aXRoIGJvZHkgIlNJR05PRkYgQkxBQ0tCT1giIHRvIExJU1RTRVJWQExJU1RTLk9CRVJP
Ti5DSH19AAV8Kik=
----boundary-LibPST-iamunique-2094591821_-_---
Received on Tue May 12 2009 - 07:50:44 UTC

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