winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
May 2009
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
4 participants
793 discussions
Start a n
N
ew thread
Vincent Povirk : gdiplus: Correct the lfHeight calculation in GdipCreateFontFromLogfontW.
by Alexandre Julliard
04 May '09
04 May '09
Module: wine Branch: master Commit: 47e70af50b252153bc76a1bf71e02a56dfea762e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=47e70af50b252153bc76a1bf7…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Fri May 1 11:09:23 2009 -0500 gdiplus: Correct the lfHeight calculation in GdipCreateFontFromLogfontW. Negative lfHeight values do not include internal leading. This was making fonts created from LOGFONT structures larger than they should be. --- dlls/gdiplus/font.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/gdiplus/font.c b/dlls/gdiplus/font.c index 68540e4..0b582a7 100644 --- a/dlls/gdiplus/font.c +++ b/dlls/gdiplus/font.c @@ -195,7 +195,7 @@ GpStatus WINGDIPAPI GdipCreateFontFromLogfontW(HDC hdc, oldfont = SelectObject(hdc, hfont); GetTextMetricsW(hdc, &textmet); - (*font)->lfw.lfHeight = -textmet.tmHeight; + (*font)->lfw.lfHeight = -(textmet.tmHeight-textmet.tmInternalLeading); (*font)->lfw.lfWeight = textmet.tmWeight; (*font)->lfw.lfCharSet = textmet.tmCharSet;
1
0
0
0
Vincent Povirk : winex11.drv: Export copied images as image/bmp.
by Alexandre Julliard
04 May '09
04 May '09
Module: wine Branch: master Commit: 56a3e788eacee60c255b1b38a19d738ba4b5fe3d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=56a3e788eacee60c255b1b38a…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Thu Apr 30 14:40:29 2009 -0500 winex11.drv: Export copied images as image/bmp. --- dlls/winex11.drv/clipboard.c | 73 +++++++++++++++++++++++++++++++++++++++++- 1 files changed, 72 insertions(+), 1 deletions(-) diff --git a/dlls/winex11.drv/clipboard.c b/dlls/winex11.drv/clipboard.c index 5a042f6..f14a84c 100644 --- a/dlls/winex11.drv/clipboard.c +++ b/dlls/winex11.drv/clipboard.c @@ -161,6 +161,8 @@ static HANDLE X11DRV_CLIPBOARD_ExportString(Display *display, Window requestor, Atom rprop, LPWINE_CLIPDATA lpData, LPDWORD lpBytes); static HANDLE X11DRV_CLIPBOARD_ExportXAPIXMAP(Display *display, Window requestor, Atom aTarget, Atom rprop, LPWINE_CLIPDATA lpdata, LPDWORD lpBytes); +static HANDLE X11DRV_CLIPBOARD_ExportImageBmp(Display *display, Window requestor, Atom aTarget, + Atom rprop, LPWINE_CLIPDATA lpdata, LPDWORD lpBytes); static HANDLE X11DRV_CLIPBOARD_ExportMetaFilePict(Display *display, Window requestor, Atom aTarget, Atom rprop, LPWINE_CLIPDATA lpdata, LPDWORD lpBytes); static HANDLE X11DRV_CLIPBOARD_ExportEnhMetaFile(Display *display, Window requestor, Atom aTarget, @@ -283,7 +285,7 @@ static WINE_CLIPFORMAT ClipFormats[] = X11DRV_CLIPBOARD_ExportClipboardData, &ClipFormats[21], &ClipFormats[23]}, { CF_DIB, wszIMAGEBMP, 0, CF_FLAG_BUILTINFMT, X11DRV_CLIPBOARD_ImportImageBmp, - NULL, &ClipFormats[22], NULL}, + X11DRV_CLIPBOARD_ExportImageBmp, &ClipFormats[22], NULL}, }; #define GET_ATOM(prop) (((prop) < FIRST_XATOM) ? (Atom)(prop) : X11DRV_Atoms[(prop) - FIRST_XATOM]) @@ -1709,6 +1711,75 @@ static HANDLE X11DRV_CLIPBOARD_ExportXAPIXMAP(Display *display, Window requestor /************************************************************************** + * X11DRV_CLIPBOARD_ExportImageBmp + * + * Export CF_DIB to image/bmp. + */ +static HANDLE X11DRV_CLIPBOARD_ExportImageBmp(Display *display, Window requestor, Atom aTarget, Atom rprop, + LPWINE_CLIPDATA lpdata, LPDWORD lpBytes) +{ + HANDLE hpackeddib; + LPBYTE dibdata; + UINT bmpsize; + HANDLE hbmpdata; + LPBYTE bmpdata; + BITMAPFILEHEADER *bfh; + + *lpBytes = 0; + + if (!X11DRV_CLIPBOARD_RenderFormat(display, lpdata)) + { + ERR("Failed to export %04x format\n", lpdata->wFormatID); + return 0; + } + + hpackeddib = lpdata->hData32; + + dibdata = GlobalLock(hpackeddib); + if (!dibdata) + { + ERR("Failed to lock packed DIB\n"); + return 0; + } + + bmpsize = sizeof(BITMAPFILEHEADER) + GlobalSize(hpackeddib); + + hbmpdata = GlobalAlloc(0, bmpsize); + + if (hbmpdata) + { + bmpdata = GlobalLock(hbmpdata); + + if (!bmpdata) + { + GlobalFree(hbmpdata); + GlobalUnlock(hpackeddib); + return 0; + } + + /* bitmap file header */ + bfh = (BITMAPFILEHEADER*)bmpdata; + bfh->bfType = 0x4d42; /* "BM" */ + bfh->bfSize = bmpsize; + bfh->bfReserved1 = 0; + bfh->bfReserved2 = 0; + bfh->bfOffBits = sizeof(BITMAPFILEHEADER) + bitmap_info_size((BITMAPINFO*)dibdata, DIB_RGB_COLORS); + + /* rest of bitmap is the same as the packed dib */ + memcpy(bfh+1, dibdata, bmpsize-sizeof(BITMAPFILEHEADER)); + + *lpBytes = bmpsize; + + GlobalUnlock(hbmpdata); + } + + GlobalUnlock(hpackeddib); + + return hbmpdata; +} + + +/************************************************************************** * X11DRV_CLIPBOARD_ExportMetaFilePict * * Export MetaFilePict.
1
0
0
0
Alexandre Julliard : winedbg: Implement single step for x86_64.
by Alexandre Julliard
04 May '09
04 May '09
Module: wine Branch: master Commit: 8b3b328319b0e737d73b35942fd8f09b54cd9743 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8b3b328319b0e737d73b35942…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri May 1 18:29:10 2009 +0200 winedbg: Implement single step for x86_64. --- programs/winedbg/be_x86_64.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/programs/winedbg/be_x86_64.c b/programs/winedbg/be_x86_64.c index 6f4bf7e..56af50f 100644 --- a/programs/winedbg/be_x86_64.c +++ b/programs/winedbg/be_x86_64.c @@ -22,6 +22,8 @@ #if defined(__x86_64__) +#define STEP_FLAG 0x00000100 /* single step flag */ + static unsigned be_x86_64_get_addr(HANDLE hThread, const CONTEXT* ctx, enum be_cpu_addr bca, ADDRESS64* addr) { @@ -60,7 +62,8 @@ static unsigned be_x86_64_get_register_info(int regno, enum be_cpu_addr* kind) static void be_x86_64_single_step(CONTEXT* ctx, unsigned enable) { - dbg_printf("not done single_step\n"); + if (enable) ctx->EFlags |= STEP_FLAG; + else ctx->EFlags &= ~STEP_FLAG; } static void be_x86_64_print_context(HANDLE hThread, const CONTEXT* ctx,
1
0
0
0
Alexandre Julliard : winedbg: Fix formatting of the flag register bits.
by Alexandre Julliard
04 May '09
04 May '09
Module: wine Branch: master Commit: b26ae69fcb81e2b579fae118a68dc25b20f5548e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b26ae69fcb81e2b579fae118a…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri May 1 18:28:49 2009 +0200 winedbg: Fix formatting of the flag register bits. --- programs/winedbg/be_i386.c | 30 +++++++----------------------- programs/winedbg/be_x86_64.c | 31 ++++++++----------------------- 2 files changed, 15 insertions(+), 46 deletions(-) diff --git a/programs/winedbg/be_i386.c b/programs/winedbg/be_i386.c index 3638463..ce2076c 100644 --- a/programs/winedbg/be_i386.c +++ b/programs/winedbg/be_i386.c @@ -197,8 +197,9 @@ static void be_i386_all_print_context(HANDLE hThread, const CONTEXT* ctx) static void be_i386_print_context(HANDLE hThread, const CONTEXT* ctx, int all_regs) { + static const char flags[] = "aVR-N--ODITSZ-A-P-C"; + int i; char buf[33]; - char* pt; dbg_printf("Register dump:\n"); @@ -208,28 +209,11 @@ static void be_i386_print_context(HANDLE hThread, const CONTEXT* ctx, int all_re (WORD)ctx->SegDs, (WORD)ctx->SegEs, (WORD)ctx->SegFs, (WORD)ctx->SegGs); - strcpy(buf, " - 00 - - - "); - pt = buf + strlen(buf) - 1; - if (ctx->EFlags & 0x00000001) *pt-- = 'C'; /* Carry Flag */ - if (ctx->EFlags & 0x00000002) *pt-- = '1'; - if (ctx->EFlags & 0x00000004) *pt-- = 'P'; /* Parity Flag */ - if (ctx->EFlags & 0x00000008) *pt-- = '-'; - if (ctx->EFlags & 0x00000010) *pt-- = 'A'; /* Auxiliary Carry Flag */ - if (ctx->EFlags & 0x00000020) *pt-- = '-'; - if (ctx->EFlags & 0x00000040) *pt-- = 'Z'; /* Zero Flag */ - if (ctx->EFlags & 0x00000080) *pt-- = 'S'; /* Sign Flag */ - if (ctx->EFlags & 0x00000100) *pt-- = 'T'; /* Trap/Trace Flag */ - if (ctx->EFlags & 0x00000200) *pt-- = 'I'; /* Interrupt Enable Flag */ - if (ctx->EFlags & 0x00000400) *pt-- = 'D'; /* Direction Indicator */ - if (ctx->EFlags & 0x00000800) *pt-- = 'O'; /* Overflow flags */ - if (ctx->EFlags & 0x00001000) *pt-- = '1'; /* I/O Privilege Level */ - if (ctx->EFlags & 0x00002000) *pt-- = '1'; /* I/O Privilege Level */ - if (ctx->EFlags & 0x00004000) *pt-- = 'N'; /* Nested Task Flag */ - if (ctx->EFlags & 0x00008000) *pt-- = '-'; - if (ctx->EFlags & 0x00010000) *pt-- = 'R'; /* Resume Flag */ - if (ctx->EFlags & 0x00020000) *pt-- = 'V'; /* Virtual Mode Flag */ - if (ctx->EFlags & 0x00040000) *pt-- = 'a'; /* Alignment Check Flag */ - + strcpy(buf, flags); + for (i = 0; buf[i]; i++) + if (buf[i] != '-' && !(ctx->EFlags & (1 << (sizeof(flags) - 2 - i)))) + buf[i] = ' '; + switch (get_selector_type(hThread, ctx, ctx->SegCs)) { case AddrMode1616: diff --git a/programs/winedbg/be_x86_64.c b/programs/winedbg/be_x86_64.c index e822012..6f4bf7e 100644 --- a/programs/winedbg/be_x86_64.c +++ b/programs/winedbg/be_x86_64.c @@ -66,31 +66,16 @@ static void be_x86_64_single_step(CONTEXT* ctx, unsigned enable) static void be_x86_64_print_context(HANDLE hThread, const CONTEXT* ctx, int all_regs) { - char *pt, buf[33]; + static const char flags[] = "aVR-N--ODITSZ-A-P-C"; + char buf[33]; + int i; - dbg_printf("Register dump:\n"); - strcpy(buf, " - 00 - - - "); - pt = buf + strlen(buf) - 1; - if (ctx->EFlags & 0x00000001) *pt-- = 'C'; /* Carry Flag */ - if (ctx->EFlags & 0x00000002) *pt-- = '1'; - if (ctx->EFlags & 0x00000004) *pt-- = 'P'; /* Parity Flag */ - if (ctx->EFlags & 0x00000008) *pt-- = '-'; - if (ctx->EFlags & 0x00000010) *pt-- = 'A'; /* Auxiliary Carry Flag */ - if (ctx->EFlags & 0x00000020) *pt-- = '-'; - if (ctx->EFlags & 0x00000040) *pt-- = 'Z'; /* Zero Flag */ - if (ctx->EFlags & 0x00000080) *pt-- = 'S'; /* Sign Flag */ - if (ctx->EFlags & 0x00000100) *pt-- = 'T'; /* Trap/Trace Flag */ - if (ctx->EFlags & 0x00000200) *pt-- = 'I'; /* Interrupt Enable Flag */ - if (ctx->EFlags & 0x00000400) *pt-- = 'D'; /* Direction Indicator */ - if (ctx->EFlags & 0x00000800) *pt-- = 'O'; /* Overflow flags */ - if (ctx->EFlags & 0x00001000) *pt-- = '1'; /* I/O Privilege Level */ - if (ctx->EFlags & 0x00002000) *pt-- = '1'; /* I/O Privilege Level */ - if (ctx->EFlags & 0x00004000) *pt-- = 'N'; /* Nested Task Flag */ - if (ctx->EFlags & 0x00008000) *pt-- = '-'; - if (ctx->EFlags & 0x00010000) *pt-- = 'R'; /* Resume Flag */ - if (ctx->EFlags & 0x00020000) *pt-- = 'V'; /* Virtual Mode Flag */ - if (ctx->EFlags & 0x00040000) *pt-- = 'a'; /* Alignment Check Flag */ + strcpy(buf, flags); + for (i = 0; buf[i]; i++) + if (buf[i] != '-' && !(ctx->EFlags & (1 << (sizeof(flags) - 2 - i)))) + buf[i] = ' '; + dbg_printf("Register dump:\n"); dbg_printf(" rip:%016lx rsp:%016lx rbp:%016lx eflags:%08x (%s)\n", ctx->Rip, ctx->Rsp, ctx->Rbp, ctx->EFlags, buf); dbg_printf(" rax:%016lx rbx:%016lx rcx:%016lx rdx:%016lx\n",
1
0
0
0
Alexandre Julliard : winebuild: Use iretq on x86_64 to restore more system registers and flags.
by Alexandre Julliard
04 May '09
04 May '09
Module: wine Branch: master Commit: 880d00fb43de924a3543b0ad53b5aaf0ad63d0cb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=880d00fb43de924a3543b0ad5…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri May 1 18:03:23 2009 +0200 winebuild: Use iretq on x86_64 to restore more system registers and flags. --- tools/winebuild/relay.c | 24 +++++++++++------------- 1 files changed, 11 insertions(+), 13 deletions(-) diff --git a/tools/winebuild/relay.c b/tools/winebuild/relay.c index 50b47d9..ddc8051 100644 --- a/tools/winebuild/relay.c +++ b/tools/winebuild/relay.c @@ -1111,19 +1111,17 @@ static void build_call_from_regs_x86_64(void) output( "\tfxrstor 0x100(%%rbx)\n" ); output( "\tldmxcsr 0x34(%%rbx)\n" ); - output( "\tmovl 0x44(%%rbx),%%eax\n" ); - output( "\tpushq %%rax\n" ); - output( "\tpopfq\n" ); - - output( "\tmovq 0x98(%%rbx),%%rax\n" ); /* stack pointer */ - output( "\tpushq 0xf8(%%rbx)\n" ); /* return address */ - output( "\tpopq -8(%%rax)\n" ); - output( "\tpushq 0x78(%%rbx)\n" ); /* rax */ - output( "\tpopq -16(%%rax)\n" ); - output( "\tmovq 0x90(%%rbx),%%rbx\n" ); - output( "\tleaq -16(%%rax),%%rsp\n" ); - output( "\tpopq %%rax\n" ); - output( "\tret\n" ); + output( "\tmovq 0xf8(%%rbx),%%rax\n" ); /* rip */ + output( "\tmovq %%rax,0(%%rsp)\n" ); + output( "\tmovw 0x38(%%rbx),%%ax\n" ); /* cs */ + output( "\tmovq %%rax,0x8(%%rsp)\n" ); + output( "\tmovl 0x44(%%rbx),%%eax\n" ); /* flags */ + output( "\tmovq %%rax,0x10(%%rsp)\n" ); + output( "\tmovq 0x98(%%rbx),%%rax\n" ); /* rsp */ + output( "\tmovq %%rax,0x18(%%rsp)\n" ); + output( "\tmovw 0x42(%%rbx),%%ax\n" ); /* ss */ + output( "\tmovq %%rax,0x20(%%rsp)\n" ); + output( "\tiretq\n" ); output_function_size( "__wine_call_from_regs" );
1
0
0
0
Alexandre Julliard : ntdll: Save all segment registers on x86_64. Implement set_cpu_context.
by Alexandre Julliard
04 May '09
04 May '09
Module: wine Branch: master Commit: a950910eecfdc17b96c75b5fa107d7118f1809c6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a950910eecfdc17b96c75b5fa…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri May 1 18:01:51 2009 +0200 ntdll: Save all segment registers on x86_64. Implement set_cpu_context. --- dlls/ntdll/signal_x86_64.c | 30 ++++++++++++++++++++++++++---- 1 files changed, 26 insertions(+), 4 deletions(-) diff --git a/dlls/ntdll/signal_x86_64.c b/dlls/ntdll/signal_x86_64.c index 8e9b8c4..15785e5 100644 --- a/dlls/ntdll/signal_x86_64.c +++ b/dlls/ntdll/signal_x86_64.c @@ -195,9 +195,21 @@ static void save_context( CONTEXT *context, const ucontext_t *sigcontext ) context->SegFs = FS_sig(sigcontext); context->SegGs = GS_sig(sigcontext); context->EFlags = EFL_sig(sigcontext); - context->SegDs = 0; /* FIXME */ - context->SegEs = 0; /* FIXME */ - context->SegSs = 0; /* FIXME */ +#ifdef DS_sig + context->SegDs = DS_sig(sigcontext); +#else + __asm__("movw %%ds,%0" : "=m" (context->SegDs)); +#endif +#ifdef ES_sig + context->SegEs = ES_sig(sigcontext); +#else + __asm__("movw %%es,%0" : "=m" (context->SegEs)); +#endif +#ifdef SS_sig + context->SegSs = SS_sig(sigcontext); +#else + __asm__("movw %%ss,%0" : "=m" (context->SegSs)); +#endif context->MxCsr = 0; /* FIXME */ if (FPU_sig(sigcontext)) { @@ -235,6 +247,15 @@ static void restore_context( const CONTEXT *context, ucontext_t *sigcontext ) FS_sig(sigcontext) = context->SegFs; GS_sig(sigcontext) = context->SegGs; EFL_sig(sigcontext) = context->EFlags; +#ifdef DS_sig + DS_sig(sigcontext) = context->SegDs; +#endif +#ifdef ES_sig + ES_sig(sigcontext) = context->SegEs; +#endif +#ifdef SS_sig + SS_sig(sigcontext) = context->SegSs; +#endif if (FPU_sig(sigcontext)) *FPU_sig(sigcontext) = context->u.FltSave; } @@ -256,7 +277,8 @@ DEFINE_REGS_ENTRYPOINT( RtlCaptureContext, 1 ) */ void set_cpu_context( const CONTEXT *context ) { - FIXME("not implemented\n"); + extern void CDECL __wine_restore_regs( const CONTEXT * ) DECLSPEC_NORETURN; + __wine_restore_regs( context ); }
1
0
0
0
Alexandre Julliard : ntdll: Use standard siginfo signal handlers on all platforms.
by Alexandre Julliard
04 May '09
04 May '09
Module: wine Branch: master Commit: 9968d84973982187a44a4b0dd7634c99434c18ee URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9968d84973982187a44a4b0dd…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri May 1 17:57:29 2009 +0200 ntdll: Use standard siginfo signal handlers on all platforms. --- dlls/ntdll/signal_powerpc.c | 256 +++++++++++++++++++------------------------ dlls/ntdll/signal_sparc.c | 83 +++++++------- dlls/ntdll/signal_x86_64.c | 130 ++++++++++------------- 3 files changed, 210 insertions(+), 259 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=9968d84973982187a44a4…
1
0
0
0
Nikolay Sivov : comctl32/listview: Fix wrong function description.
by Alexandre Julliard
01 May '09
01 May '09
Module: wine Branch: master Commit: 3d7eb3d4141ef58089d7f0a2bd2a26defebb90f8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3d7eb3d4141ef58089d7f0a2b…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Fri May 1 17:23:23 2009 +0400 comctl32/listview: Fix wrong function description. --- dlls/comctl32/listview.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index 28dce02..967b867 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -7855,7 +7855,7 @@ static BOOL LISTVIEW_SetTextColor (LISTVIEW_INFO *infoPtr, COLORREF clrText) /*** * DESCRIPTION: - * Determines which listview item is located at the specified position. + * Sets new ToolTip window to ListView control. * * PARAMETER(S): * [I] infoPtr : valid pointer to the listview structure
1
0
0
0
Hans Leidekker : msi: Implement MsiApplyMultiplePatchesA/W.
by Alexandre Julliard
01 May '09
01 May '09
Module: wine Branch: master Commit: b4b8bc830f7b9cb370f2d0e0c2ff04e4c70315d7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b4b8bc830f7b9cb370f2d0e0c…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Fri May 1 15:06:53 2009 +0200 msi: Implement MsiApplyMultiplePatchesA/W. --- dlls/msi/msi.c | 150 ++++++++++++++++++++++++++++++++++++---------- dlls/msi/msi.spec | 4 +- dlls/msi/tests/package.c | 33 ++++++++++ include/msi.h | 4 + 4 files changed, 158 insertions(+), 33 deletions(-) diff --git a/dlls/msi/msi.c b/dlls/msi/msi.c index bee45b0..43436bd 100644 --- a/dlls/msi/msi.c +++ b/dlls/msi/msi.c @@ -301,13 +301,13 @@ done: return r; } -UINT WINAPI MsiApplyPatchW(LPCWSTR szPatchPackage, LPCWSTR szInstallPackage, - INSTALLTYPE eInstallType, LPCWSTR szCommandLine) +static UINT MSI_ApplyPatchW(LPCWSTR szPatchPackage, LPCWSTR szProductCode, LPCWSTR szCommandLine) { MSIHANDLE patch, info; UINT r, type; DWORD size = 0; LPCWSTR cmd_ptr = szCommandLine; + LPCWSTR product_code = szProductCode; LPWSTR beg, end; LPWSTR cmd = NULL, codes = NULL; @@ -315,41 +315,36 @@ UINT WINAPI MsiApplyPatchW(LPCWSTR szPatchPackage, LPCWSTR szInstallPackage, static const WCHAR patcheq[] = {'P','A','T','C','H','=',0}; static WCHAR empty[] = {0}; - TRACE("%s %s %d %s\n", debugstr_w(szPatchPackage), debugstr_w(szInstallPackage), - eInstallType, debugstr_w(szCommandLine)); - - if (szInstallPackage || eInstallType == INSTALLTYPE_NETWORK_IMAGE || - eInstallType == INSTALLTYPE_SINGLE_INSTANCE) + if (!szProductCode) { - FIXME("Only reading target products from patch\n"); - return ERROR_CALL_NOT_IMPLEMENTED; - } + r = MsiOpenDatabaseW(szPatchPackage, MSIDBOPEN_READONLY, &patch); + if (r != ERROR_SUCCESS) + return r; - r = MsiOpenDatabaseW(szPatchPackage, MSIDBOPEN_READONLY, &patch); - if (r != ERROR_SUCCESS) - return r; + r = MsiGetSummaryInformationW(patch, NULL, 0, &info); + if (r != ERROR_SUCCESS) + goto done; - r = MsiGetSummaryInformationW(patch, NULL, 0, &info); - if (r != ERROR_SUCCESS) - goto done; + r = MsiSummaryInfoGetPropertyW(info, PID_TEMPLATE, &type, NULL, NULL, empty, &size); + if (r != ERROR_MORE_DATA || !size || type != VT_LPSTR) + { + ERR("Failed to read product codes from patch\n"); + goto done; + } - r = MsiSummaryInfoGetPropertyW(info, PID_TEMPLATE, &type, NULL, NULL, empty, &size); - if (r != ERROR_MORE_DATA || !size || type != VT_LPSTR) - { - ERR("Failed to read product codes from patch\n"); - goto done; - } + codes = msi_alloc(++size * sizeof(WCHAR)); + if (!codes) + { + r = ERROR_OUTOFMEMORY; + goto done; + } - codes = msi_alloc(++size * sizeof(WCHAR)); - if (!codes) - { - r = ERROR_OUTOFMEMORY; - goto done; - } + r = MsiSummaryInfoGetPropertyW(info, PID_TEMPLATE, &type, NULL, NULL, codes, &size); + if (r != ERROR_SUCCESS) + goto done; - r = MsiSummaryInfoGetPropertyW(info, PID_TEMPLATE, &type, NULL, NULL, codes, &size); - if (r != ERROR_SUCCESS) - goto done; + product_code = codes; + } if (!szCommandLine) cmd_ptr = empty; @@ -389,6 +384,99 @@ done: return r; } +UINT WINAPI MsiApplyPatchW(LPCWSTR szPatchPackage, LPCWSTR szInstallPackage, + INSTALLTYPE eInstallType, LPCWSTR szCommandLine) +{ + TRACE("%s %s %d %s\n", debugstr_w(szPatchPackage), debugstr_w(szInstallPackage), + eInstallType, debugstr_w(szCommandLine)); + + if (szInstallPackage || eInstallType == INSTALLTYPE_NETWORK_IMAGE || + eInstallType == INSTALLTYPE_SINGLE_INSTANCE) + { + FIXME("Only reading target products from patch\n"); + return ERROR_CALL_NOT_IMPLEMENTED; + } + + return MSI_ApplyPatchW(szPatchPackage, NULL, szCommandLine); +} + +UINT WINAPI MsiApplyMultiplePatchesA(LPCSTR szPatchPackages, + LPCSTR szProductCode, LPCSTR szPropertiesList) +{ + LPWSTR patch_packages = NULL; + LPWSTR product_code = NULL; + LPWSTR properties_list = NULL; + UINT r = ERROR_OUTOFMEMORY; + + TRACE("%s %s %s\n", debugstr_a(szPatchPackages), debugstr_a(szProductCode), + debugstr_a(szPropertiesList)); + + if (!szPatchPackages || !szPatchPackages[0]) + return ERROR_INVALID_PARAMETER; + + if (!(patch_packages = strdupAtoW(szPatchPackages))) + return ERROR_OUTOFMEMORY; + + if (szProductCode && !(product_code = strdupAtoW(szProductCode))) + goto done; + + if (szPropertiesList && !(properties_list = strdupAtoW(szPropertiesList))) + goto done; + + r = MsiApplyMultiplePatchesW(patch_packages, product_code, properties_list); + +done: + msi_free(patch_packages); + msi_free(product_code); + msi_free(properties_list); + + return r; +} + +UINT WINAPI MsiApplyMultiplePatchesW(LPCWSTR szPatchPackages, + LPCWSTR szProductCode, LPCWSTR szPropertiesList) +{ + UINT r = ERROR_SUCCESS; + LPCWSTR beg, end; + + TRACE("%s %s %s\n", debugstr_w(szPatchPackages), debugstr_w(szProductCode), + debugstr_w(szPropertiesList)); + + if (!szPatchPackages || !szPatchPackages[0]) + return ERROR_INVALID_PARAMETER; + + beg = end = szPatchPackages; + while (*beg) + { + DWORD len; + LPWSTR patch; + + while (*beg == ' ') beg++; + while (*end && *end != ';') end++; + + len = end - beg; + while (len && beg[len - 1] == ' ') len--; + + if (!len) return ERROR_INVALID_NAME; + + patch = msi_alloc((len + 1) * sizeof(WCHAR)); + if (!patch) + return ERROR_OUTOFMEMORY; + + memcpy(patch, beg, len * sizeof(WCHAR)); + patch[len] = '\0'; + + r = MSI_ApplyPatchW(patch, szProductCode, szPropertiesList); + msi_free(patch); + + if (r != ERROR_SUCCESS) + break; + + beg = ++end; + } + return r; +} + UINT WINAPI MsiDetermineApplicablePatchesA(LPCSTR szProductPackagePath, DWORD cPatchInfo, PMSIPATCHSEQUENCEINFOA pPatchInfo) { diff --git a/dlls/msi/msi.spec b/dlls/msi/msi.spec index 14178e8..1475028 100644 --- a/dlls/msi/msi.spec +++ b/dlls/msi/msi.spec @@ -232,8 +232,8 @@ 236 stub Migrate10CachedPackagesW 237 stub MsiRemovePatchesA 238 stub MsiRemovePatchesW -239 stub MsiApplyMultiplePatchesA -240 stub MsiApplyMultiplePatchesW +239 stdcall MsiApplyMultiplePatchesA(str str str) +240 stdcall MsiApplyMultiplePatchesW(wstr wstr wstr) 241 stub MsiExtractPatchXMLDataA 242 stub MsiExtractPatchXMLDataW 243 stdcall MsiGetPatchInfoExA(str str str long str ptr ptr) diff --git a/dlls/msi/tests/package.c b/dlls/msi/tests/package.c index ccc9208..35a22de 100644 --- a/dlls/msi/tests/package.c +++ b/dlls/msi/tests/package.c @@ -11533,6 +11533,38 @@ static void test_MsiSetProperty(void) DeleteFileA(msifile); } +static void test_MsiApplyMultiplePatches(void) +{ + UINT r; + + r = MsiApplyMultiplePatchesA(NULL, NULL, NULL); + ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %u\n", r); + + r = MsiApplyMultiplePatchesA("", NULL, NULL); + ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %u\n", r); + + r = MsiApplyMultiplePatchesA(";", NULL, NULL); + ok(r == ERROR_INVALID_NAME, "Expected ERROR_INVALID_NAME, got %u\n", r); + + r = MsiApplyMultiplePatchesA(" ;", NULL, NULL); + ok(r == ERROR_INVALID_NAME, "Expected ERROR_INVALID_NAME, got %u\n", r); + + r = MsiApplyMultiplePatchesA(";;", NULL, NULL); + ok(r == ERROR_INVALID_NAME, "Expected ERROR_INVALID_NAME, got %u\n", r); + + r = MsiApplyMultiplePatchesA("nosuchpatchpackage;", NULL, NULL); + todo_wine ok(r == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %u\n", r); + + r = MsiApplyMultiplePatchesA(";nosuchpatchpackage", NULL, NULL); + ok(r == ERROR_INVALID_NAME, "Expected ERROR_INVALID_NAME, got %u\n", r); + + r = MsiApplyMultiplePatchesA("nosuchpatchpackage;nosuchpatchpackage", NULL, NULL); + todo_wine ok(r == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %u\n", r); + + r = MsiApplyMultiplePatchesA(" nosuchpatchpackage ; nosuchpatchpackage ", NULL, NULL); + todo_wine ok(r == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %u\n", r); +} + START_TEST(package) { GetCurrentDirectoryA(MAX_PATH, CURR_DIR); @@ -11566,4 +11598,5 @@ START_TEST(package) test_emptypackage(); test_MsiGetProductProperty(); test_MsiSetProperty(); + test_MsiApplyMultiplePatches(); } diff --git a/include/msi.h b/include/msi.h index a6a5f3d..5e68fdc 100644 --- a/include/msi.h +++ b/include/msi.h @@ -649,6 +649,10 @@ UINT WINAPI MsiDetermineApplicablePatchesA(LPCSTR, DWORD, PMSIPATCHSEQUENCEINFOA UINT WINAPI MsiDetermineApplicablePatchesW(LPCWSTR, DWORD, PMSIPATCHSEQUENCEINFOW); #define MsiDetermineApplicablePatches WINELIB_NAME_AW(MsiDetermineApplicablePatches) +UINT WINAPI MsiApplyMultiplePatchesA(LPCSTR, LPCSTR, LPCSTR); +UINT WINAPI MsiApplyMultiplePatchesW(LPCWSTR, LPCWSTR, LPCWSTR); +#define MsiApplyMultiplePatches WINELIB_NAME_AW(MsiApplyMultiplePatches) + /* Non Unicode */ UINT WINAPI MsiCloseHandle(MSIHANDLE); UINT WINAPI MsiCloseAllHandles(void);
1
0
0
0
Rein Klazes : comdlg32: Implement OFN_ENABLESIZING flag for GetOpenFileName and friends.
by Alexandre Julliard
01 May '09
01 May '09
Module: wine Branch: master Commit: dd16b91a87c91de56a93d5e3dae4de78e3e6f411 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=dd16b91a87c91de56a93d5e3d…
Author: Rein Klazes <wijn(a)online.nl> Date: Thu Apr 30 08:06:50 2009 +0200 comdlg32: Implement OFN_ENABLESIZING flag for GetOpenFileName and friends. --- dlls/comdlg32/filedlg.c | 161 +++++++++++++++++++++++++++++++++++++++- dlls/comdlg32/filedlgbrowser.h | 3 + 2 files changed, 162 insertions(+), 2 deletions(-) diff --git a/dlls/comdlg32/filedlg.c b/dlls/comdlg32/filedlg.c index 8c8e230..b423942 100644 --- a/dlls/comdlg32/filedlg.c +++ b/dlls/comdlg32/filedlg.c @@ -37,7 +37,6 @@ * FIXME: add to recent docs * * FIXME: flags not implemented: OFN_DONTADDTORECENT, - * OFN_ENABLESIZING, * OFN_NODEREFERENCELINKS, OFN_NOREADONLYRETURN, * OFN_NOTESTFILECREATE, OFN_USEMONIKERS * @@ -82,7 +81,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(commdlg); #define UNIMPLEMENTED_FLAGS \ -(OFN_DONTADDTORECENT | OFN_ENABLESIZING |\ +(OFN_DONTADDTORECENT |\ OFN_NODEREFERENCELINKS | OFN_NOREADONLYRETURN |\ OFN_NOTESTFILECREATE /*| OFN_USEMONIKERS*/) @@ -271,6 +270,13 @@ static BOOL GetFileName95(FileOpenDlgInfos *fodInfos) return FALSE; } + if (fodInfos->ofnInfos->Flags & OFN_ENABLESIZING) + { + ((LPDLGTEMPLATEW)template)->style |= WS_SIZEBOX; + fodInfos->sizedlg.cx = fodInfos->sizedlg.cy = 0; + fodInfos->initial_size.x = fodInfos->initial_size.y = 0; + } + /* old style hook messages */ if (IsHooked(fodInfos)) { @@ -979,6 +985,125 @@ static INT_PTR FILEDLG95_HandleCustomDialogMessages(HWND hwnd, UINT uMsg, WPARAM } /*********************************************************************** + * FILEDLG95_OnWMGetMMI + * + * WM_GETMINMAXINFO message handler for resizable dialogs + */ +static LRESULT FILEDLG95_OnWMGetMMI( HWND hwnd, LPMINMAXINFO mmiptr) +{ + FileOpenDlgInfos *fodInfos = GetPropA(hwnd,FileOpenDlgInfosStr); + if( !(fodInfos->ofnInfos->Flags & OFN_ENABLESIZING)) return FALSE; + if( fodInfos->initial_size.x || fodInfos->initial_size.y) + { + mmiptr->ptMinTrackSize = fodInfos->initial_size; + } + return TRUE; +} + +/*********************************************************************** + * FILEDLG95_OnWMSize + * + * WM_SIZE message handler, resize the dialog. Re-arrange controls. + * + * FIXME: this could be made more elaborate. Now use a simple scheme + * where the file view is enlarged and the controls are either moved + * vertically or horizontally to get out of the way. Only the "grip" + * is moved in both directions to stay in the corner. + */ +static LRESULT FILEDLG95_OnWMSize(HWND hwnd, WPARAM wParam, LPARAM lParam) +{ + RECT rc, rcview; + int chgx, chgy; + HWND ctrl; + HDWP hdwp; + FileOpenDlgInfos *fodInfos; + + if( wParam != SIZE_RESTORED) return FALSE; + fodInfos = GetPropA(hwnd,FileOpenDlgInfosStr); + if( !(fodInfos->ofnInfos->Flags & OFN_ENABLESIZING)) return FALSE; + /* get the new dialog rectangle */ + GetWindowRect( hwnd, &rc); + /* not initialized yet */ + if( (fodInfos->sizedlg.cx == 0 && fodInfos->sizedlg.cy == 0) || + ((fodInfos->sizedlg.cx == rc.right -rc.left) && /* no change */ + (fodInfos->sizedlg.cy == rc.bottom -rc.top))) + return FALSE; + chgx = rc.right - rc.left - fodInfos->sizedlg.cx; + chgy = rc.bottom - rc.top - fodInfos->sizedlg.cy; + fodInfos->sizedlg.cx = rc.right - rc.left; + fodInfos->sizedlg.cy = rc.bottom - rc.top; + /* change the size of the view window */ + GetWindowRect( fodInfos->ShellInfos.hwndView, &rcview); + MapWindowPoints( NULL, hwnd, (LPPOINT) &rcview, 2); + hdwp = BeginDeferWindowPos( 10); + DeferWindowPos( hdwp, fodInfos->ShellInfos.hwndView, NULL, 0, 0, + rcview.right - rcview.left + chgx, + rcview.bottom - rcview.top + chgy, + SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER); + /* change position and sizes of the controls */ + for( ctrl = GetWindow( hwnd, GW_CHILD); ctrl ; ctrl = GetWindow( ctrl, GW_HWNDNEXT)) + { + GetWindowRect( ctrl, &rc); + MapWindowPoints( NULL, hwnd, (LPPOINT) &rc, 2); + if( ctrl == fodInfos->DlgInfos.hwndGrip) + { + DeferWindowPos( hdwp, ctrl, NULL, rc.left + chgx, rc.top + chgy, + 0, 0, + SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOZORDER); + } + else if( rc.top > rcview.bottom) + { + /* if it was below the shell view + * move to bottom */ + DeferWindowPos( hdwp, ctrl, NULL, rc.left, rc.top + chgy, + rc.right - rc.left, rc.bottom - rc.top, + SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOZORDER); + } + else if( rc.left > rcview.right) + { + /* if it was to the right of the shell view + * move to right */ + DeferWindowPos( hdwp, ctrl, NULL, rc.left + chgx, rc.top, + rc.right - rc.left, rc.bottom - rc.top, + SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOZORDER); + } + } + if(fodInfos->DlgInfos.hwndCustomDlg && + (fodInfos->ofnInfos->Flags & (OFN_ENABLETEMPLATE | OFN_ENABLETEMPLATEHANDLE))) + { + GetClientRect(hwnd, &rc); + DeferWindowPos( hdwp,fodInfos->DlgInfos.hwndCustomDlg, NULL, + 0, 0, rc.right, rc.bottom, SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER); + for( ctrl = GetWindow( fodInfos->DlgInfos.hwndCustomDlg, GW_CHILD); + ctrl ; ctrl = GetWindow( ctrl, GW_HWNDNEXT)) + { + GetWindowRect( ctrl, &rc); + MapWindowPoints( NULL, hwnd, (LPPOINT) &rc, 2); + if( rc.top > rcview.bottom) + { + /* if it was below the shell view + * move to bottom */ + DeferWindowPos( hdwp, ctrl, NULL, rc.left, rc.top + chgy, + rc.right - rc.left, rc.bottom - rc.top, + SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOZORDER); + } + else if( rc.left > rcview.right) + { + /* if it was to the right of the shell view + * move to right */ + DeferWindowPos( hdwp, ctrl, NULL, rc.left + chgx, rc.top, + rc.right - rc.left, rc.bottom - rc.top, + SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOZORDER); + } + } + } + EndDeferWindowPos( hdwp); + /* should not be needed */ + RedrawWindow( hwnd, NULL, 0, RDW_ALLCHILDREN | RDW_INVALIDATE ); + return TRUE; +} + +/*********************************************************************** * FileOpenDlgProc95 * * File open dialog procedure @@ -994,6 +1119,9 @@ INT_PTR CALLBACK FileOpenDlgProc95(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM l case WM_INITDIALOG: { FileOpenDlgInfos * fodInfos = (FileOpenDlgInfos *)lParam; + RECT rc; + int gripx = GetSystemMetrics( SM_CYHSCROLL); + int gripy = GetSystemMetrics( SM_CYVSCROLL); /* Adds the FileOpenDlgInfos in the property list of the dialog so it will be easily accessible through a GetPropA(...) */ @@ -1001,17 +1129,46 @@ INT_PTR CALLBACK FileOpenDlgProc95(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM l FILEDLG95_InitControls(hwnd); + if (fodInfos->ofnInfos->Flags & OFN_ENABLESIZING) + { + GetWindowRect( hwnd, &rc); + fodInfos->DlgInfos.hwndGrip = + CreateWindowExA( 0, "SCROLLBAR", NULL, + WS_CHILD | WS_GROUP | WS_VISIBLE | WS_CLIPSIBLINGS | + SBS_SIZEGRIP | SBS_SIZEBOXBOTTOMRIGHTALIGN, + rc.right - gripx, rc.bottom - gripy, + gripx, gripy, hwnd, (HMENU) -1, COMDLG32_hInstance, NULL); + } + fodInfos->DlgInfos.hwndCustomDlg = CreateTemplateDialog((FileOpenDlgInfos *)lParam, hwnd); FILEDLG95_ResizeControls(hwnd, wParam, lParam); FILEDLG95_FillControls(hwnd, wParam, lParam); + if (fodInfos->ofnInfos->Flags & OFN_ENABLESIZING) + { + GetWindowRect( hwnd, &rc); + /* FIXME: should remember sizes of last invocation */ + fodInfos->sizedlg.cx = rc.right - rc.left; + fodInfos->sizedlg.cy = rc.bottom - rc.top; + fodInfos->initial_size.x = fodInfos->sizedlg.cx; + fodInfos->initial_size.y = fodInfos->sizedlg.cy; + GetClientRect( hwnd, &rc); + SetWindowPos( fodInfos->DlgInfos.hwndGrip, NULL, + rc.right - gripx, rc.bottom - gripy, + 0, 0, SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOZORDER); + } + SendCustomDlgNotificationMessage(hwnd,CDN_INITDONE); SendCustomDlgNotificationMessage(hwnd,CDN_FOLDERCHANGE); SendCustomDlgNotificationMessage(hwnd,CDN_SELCHANGE); return 0; } + case WM_SIZE: + return FILEDLG95_OnWMSize(hwnd, wParam, lParam); + case WM_GETMINMAXINFO: + return FILEDLG95_OnWMGetMMI( hwnd, (LPMINMAXINFO)lParam); case WM_COMMAND: return FILEDLG95_OnWMCommand(hwnd, wParam, lParam); case WM_DRAWITEM: diff --git a/dlls/comdlg32/filedlgbrowser.h b/dlls/comdlg32/filedlgbrowser.h index f8da75e..ca332ec 100644 --- a/dlls/comdlg32/filedlgbrowser.h +++ b/dlls/comdlg32/filedlgbrowser.h @@ -58,6 +58,8 @@ typedef struct LPCWSTR defext; LPCWSTR filter; LPCWSTR customfilter; + SIZE sizedlg; /* remember the size of the dialog */ + POINT initial_size; /* remember the initial size of the dialog */ struct { IShellBrowser *FOIShellBrowser; IShellFolder *FOIShellFolder; @@ -78,6 +80,7 @@ typedef struct HWND hwndLookInCB; HWND hwndFileName; HWND hwndTB; + HWND hwndGrip; HWND hwndCustomDlg; DWORD dwDlgProp; } DlgInfos;
1
0
0
0
← Newer
1
...
75
76
77
78
79
80
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
Results per page:
10
25
50
100
200