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
October 2006
----- 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
3 participants
1032 discussions
Start a n
N
ew thread
Alexandre Julliard : user: Adapt system metrics for multi-monitor setups.
by Alexandre Julliard
23 Oct '06
23 Oct '06
Module: wine Branch: master Commit: a12f15325a048785a198f724684e5cb22b4e2c8e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a12f15325a048785a198f7246…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Oct 23 14:29:57 2006 +0200 user: Adapt system metrics for multi-monitor setups. --- dlls/user/sysparams.c | 58 ++++++++++++++++++++++++++++++++++++++---- dlls/user/tests/sysparams.c | 4 +- 2 files changed, 54 insertions(+), 8 deletions(-) diff --git a/dlls/user/sysparams.c b/dlls/user/sysparams.c index 906eea1..4ef2782 100644 --- a/dlls/user/sysparams.c +++ b/dlls/user/sysparams.c @@ -488,6 +488,31 @@ static void SYSPARAMS_NonClientMetrics32 SYSPARAMS_LogFont32ATo32W( &lpnm32A->lfMessageFont, &lpnm32W->lfMessageFont ); } + +/* Helper functions to retrieve monitors info */ + +struct monitor_info +{ + int count; + RECT virtual_rect; +}; + +static BOOL CALLBACK monitor_info_proc( HMONITOR monitor, HDC hdc, LPRECT rect, LPARAM lp ) +{ + struct monitor_info *info = (struct monitor_info *)lp; + info->count++; + UnionRect( &info->virtual_rect, &info->virtual_rect, rect ); + return TRUE; +} + +static void get_monitors_info( struct monitor_info *info ) +{ + info->count = 0; + SetRectEmpty( &info->virtual_rect ); + EnumDisplayMonitors( 0, NULL, monitor_info_proc, (LPARAM)info ); +} + + /* get text metrics and/or "average" char width of the specified logfont * for the specified dc */ static void get_text_metr_size( HDC hdc, LOGFONTW *plf, TEXTMETRICW * ptm, UINT *psz) @@ -2677,9 +2702,9 @@ INT WINAPI GetSystemMetrics( INT index ) if (!spi_loaded[SPI_NONCLIENTMETRICS_IDX]) load_nonclient_metrics(); return nonclient_metrics.iCaptionHeight + 6; case SM_CXMAXTRACK: - return GetSystemMetrics(SM_CXSCREEN) + 4 + 2 * GetSystemMetrics(SM_CXFRAME); + return GetSystemMetrics(SM_CXVIRTUALSCREEN) + 4 + 2 * GetSystemMetrics(SM_CXFRAME); case SM_CYMAXTRACK: - return GetSystemMetrics(SM_CYSCREEN) + 4 + 2 * GetSystemMetrics(SM_CYFRAME); + return GetSystemMetrics(SM_CYVIRTUALSCREEN) + 4 + 2 * GetSystemMetrics(SM_CYFRAME); case SM_CXMAXIMIZED: /* FIXME: subtract the width of any vertical application toolbars*/ return GetSystemMetrics(SM_CXSCREEN) + 2 * GetSystemMetrics(SM_CXFRAME); @@ -2708,14 +2733,35 @@ INT WINAPI GetSystemMetrics( INT index ) case SM_MOUSEWHEELPRESENT: return 1; case SM_XVIRTUALSCREEN: + { + struct monitor_info info; + get_monitors_info( &info ); + return info.virtual_rect.left; + } case SM_YVIRTUALSCREEN: - return 0; + { + struct monitor_info info; + get_monitors_info( &info ); + return info.virtual_rect.top; + } case SM_CXVIRTUALSCREEN: - return GetSystemMetrics(SM_CXSCREEN); + { + struct monitor_info info; + get_monitors_info( &info ); + return info.virtual_rect.right - info.virtual_rect.left; + } case SM_CYVIRTUALSCREEN: - return GetSystemMetrics(SM_CYSCREEN); + { + struct monitor_info info; + get_monitors_info( &info ); + return info.virtual_rect.bottom - info.virtual_rect.top; + } case SM_CMONITORS: - return 1; + { + struct monitor_info info; + get_monitors_info( &info ); + return info.count; + } case SM_SAMEDISPLAYFORMAT: return 1; case SM_IMMENABLED: diff --git a/dlls/user/tests/sysparams.c b/dlls/user/tests/sysparams.c index fa7bfdd..1555e5a 100644 --- a/dlls/user/tests/sysparams.c +++ b/dlls/user/tests/sysparams.c @@ -2384,9 +2384,9 @@ void test_GetSystemMetrics( void) /* SM_ARRANGE */ ok_gsm( SM_CXMINIMIZED, minim.iWidth + 6); ok_gsm( SM_CYMINIMIZED, GetSystemMetrics( SM_CYCAPTION) + 5); - ok_gsm( SM_CXMAXTRACK, GetSystemMetrics( SM_CXSCREEN) + + ok_gsm( SM_CXMAXTRACK, GetSystemMetrics( SM_CXVIRTUALSCREEN) + 4 + 2 * GetSystemMetrics( SM_CXFRAME)); - ok_gsm( SM_CYMAXTRACK, GetSystemMetrics( SM_CYSCREEN) + + ok_gsm( SM_CYMAXTRACK, GetSystemMetrics( SM_CYVIRTUALSCREEN) + 4 + 2 * GetSystemMetrics( SM_CYFRAME)); /* the next two cannot really be tested as they depend on (application) * toolbars */
1
0
0
0
Alexandre Julliard : comctl32: Position the tooltip window correctly on multi-monitor setups.
by Alexandre Julliard
23 Oct '06
23 Oct '06
Module: wine Branch: master Commit: 9d6d54f5e65d1e4eb544873746efe6ca857ae303 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9d6d54f5e65d1e4eb54487374…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Oct 23 14:05:34 2006 +0200 comctl32: Position the tooltip window correctly on multi-monitor setups. --- dlls/comctl32/tooltips.c | 21 ++++++++++++++------- 1 files changed, 14 insertions(+), 7 deletions(-) diff --git a/dlls/comctl32/tooltips.c b/dlls/comctl32/tooltips.c index 3462ef9..e9badc8 100644 --- a/dlls/comctl32/tooltips.c +++ b/dlls/comctl32/tooltips.c @@ -496,7 +496,9 @@ static void TOOLTIPS_Show (HWND hwnd, TOOLTIPS_INFO *infoPtr) { TTTOOL_INFO *toolPtr; - RECT rect, wndrect; + HMONITOR monitor; + MONITORINFO mon_info; + RECT rect; SIZE size; NMHDR hdr; int ptfx = 0; @@ -593,13 +595,18 @@ TOOLTIPS_Show (HWND hwnd, TOOLTIPS_INFO rect.bottom = rect.top + size.cy; /* check position */ - wndrect.right = GetSystemMetrics( SM_CXSCREEN ); - if( rect.right > wndrect.right ) { - rect.left -= rect.right - wndrect.right + 2; - rect.right = wndrect.right - 2; + + monitor = MonitorFromRect( &rect, MONITOR_DEFAULTTOPRIMARY ); + mon_info.cbSize = sizeof(mon_info); + GetMonitorInfoW( monitor, &mon_info ); + + if( rect.right > mon_info.rcWork.right ) { + rect.left -= rect.right - mon_info.rcWork.right + 2; + rect.right = mon_info.rcWork.right - 2; } - wndrect.bottom = GetSystemMetrics( SM_CYSCREEN ); - if( rect.bottom > wndrect.bottom ) { + if (rect.left < mon_info.rcWork.left) rect.left = mon_info.rcWork.left; + + if( rect.bottom > mon_info.rcWork.bottom ) { RECT rc; if (toolPtr->uFlags & TTF_IDISHWND)
1
0
0
0
Alexandre Julliard : user: Maximize windows to the right monitor on multi-monitor setups.
by Alexandre Julliard
23 Oct '06
23 Oct '06
Module: wine Branch: master Commit: 280defcfcf478d825bd565e7af292ef217aef7fe URL:
http://source.winehq.org/git/wine.git/?a=commit;h=280defcfcf478d825bd565e7a…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Oct 23 14:04:52 2006 +0200 user: Maximize windows to the right monitor on multi-monitor setups. --- dlls/user/winpos.c | 27 +++++++++++++++++++++++++-- 1 files changed, 25 insertions(+), 2 deletions(-) diff --git a/dlls/user/winpos.c b/dlls/user/winpos.c index c9307cd..9e91bc4 100644 --- a/dlls/user/winpos.c +++ b/dlls/user/winpos.c @@ -727,6 +727,7 @@ void WINPOS_GetMinMaxInfo( HWND hwnd, PO { LPINTERNALPOS lpPos; MINMAXINFO MinMax; + HMONITOR monitor; INT xinc, yinc; LONG style = GetWindowLongA( hwnd, GWL_STYLE ); LONG exstyle = GetWindowLongA( hwnd, GWL_EXSTYLE ); @@ -759,8 +760,8 @@ void WINPOS_GetMinMaxInfo( HWND hwnd, PO } MinMax.ptMinTrackSize.x = GetSystemMetrics(SM_CXMINTRACK); MinMax.ptMinTrackSize.y = GetSystemMetrics(SM_CYMINTRACK); - MinMax.ptMaxTrackSize.x = GetSystemMetrics(SM_CXSCREEN) + 2*GetSystemMetrics(SM_CXFRAME); - MinMax.ptMaxTrackSize.y = GetSystemMetrics(SM_CYSCREEN) + 2*GetSystemMetrics(SM_CYFRAME); + MinMax.ptMaxTrackSize.x = GetSystemMetrics(SM_CXMAXTRACK); + MinMax.ptMaxTrackSize.y = GetSystemMetrics(SM_CYMAXTRACK); if (HAS_DLGFRAME( style, exstyle )) { @@ -798,6 +799,28 @@ void WINPOS_GetMinMaxInfo( HWND hwnd, PO SendMessageW( hwnd, WM_GETMINMAXINFO, 0, (LPARAM)&MinMax ); + /* if the app didn't change the values, adapt them for the current monitor */ + + if ((monitor = MonitorFromWindow( hwnd, MONITOR_DEFAULTTOPRIMARY ))) + { + MONITORINFO mon_info; + + mon_info.cbSize = sizeof(mon_info); + GetMonitorInfoW( monitor, &mon_info ); + + if (MinMax.ptMaxSize.x == GetSystemMetrics(SM_CXSCREEN) && + MinMax.ptMaxSize.y == GetSystemMetrics(SM_CYSCREEN)) + { + MinMax.ptMaxSize.x = mon_info.rcWork.right - mon_info.rcWork.left; + MinMax.ptMaxSize.y = mon_info.rcWork.bottom - mon_info.rcWork.top; + } + if (MinMax.ptMaxPosition.x == -xinc && MinMax.ptMaxPosition.y == -yinc) + { + MinMax.ptMaxPosition.x = mon_info.rcWork.left - xinc; + MinMax.ptMaxPosition.y = mon_info.rcWork.top - yinc; + } + } + /* Some sanity checks */ TRACE("%d %d / %d %d / %d %d / %d %d\n",
1
0
0
0
Alexandre Julliard : user: Fixed combo box drop position on multi-monitor setups.
by Alexandre Julliard
23 Oct '06
23 Oct '06
Module: wine Branch: master Commit: 30a25defb3ec288f7e635ce3580e61629e145992 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=30a25defb3ec288f7e635ce35…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Oct 23 14:04:42 2006 +0200 user: Fixed combo box drop position on multi-monitor setups. --- dlls/user/combo.c | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/dlls/user/combo.c b/dlls/user/combo.c index a82cd5f..c2c49bb 100644 --- a/dlls/user/combo.c +++ b/dlls/user/combo.c @@ -1052,6 +1052,8 @@ static void CBUpdateEdit( LPHEADCOMBO lp */ static void CBDropDown( LPHEADCOMBO lphc ) { + HMONITOR monitor; + MONITORINFO mon_info; RECT rect,r; int nItems = 0; int nDroppedHeight; @@ -1123,7 +1125,11 @@ static void CBDropDown( LPHEADCOMBO lphc } /*If height of dropped rectangle gets beyond a screen size it should go up, otherwise down.*/ - if( (rect.bottom + nDroppedHeight) >= GetSystemMetrics( SM_CYSCREEN ) ) + monitor = MonitorFromRect( &rect, MONITOR_DEFAULTTOPRIMARY ); + mon_info.cbSize = sizeof(mon_info); + GetMonitorInfoW( monitor, &mon_info ); + + if( (rect.bottom + nDroppedHeight) >= mon_info.rcWork.bottom ) rect.bottom = rect.top - nDroppedHeight; SetWindowPos( lphc->hWndLBox, HWND_TOP, rect.left, rect.bottom,
1
0
0
0
Alexandre Julliard : user: Take multiple monitors into account when placing a dialog.
by Alexandre Julliard
23 Oct '06
23 Oct '06
Module: wine Branch: master Commit: ca58c8179fef4f89fbc304ba8cbad86432c8dfca URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ca58c8179fef4f89fbc304ba8…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Oct 23 14:04:12 2006 +0200 user: Take multiple monitors into account when placing a dialog. --- dlls/user/dialog.c | 63 ++++++++++++++++++++++++++++++++++---------------- dlls/user/dialog16.c | 61 ++++++++++++++++++++++++++++++++++-------------- 2 files changed, 86 insertions(+), 38 deletions(-) diff --git a/dlls/user/dialog.c b/dlls/user/dialog.c index 8934a54..d43247c 100644 --- a/dlls/user/dialog.c +++ b/dlls/user/dialog.c @@ -463,6 +463,8 @@ static HWND DIALOG_CreateIndirect( HINST { HWND hwnd; RECT rect; + POINT pos; + SIZE size; DLG_TEMPLATE template; DIALOGINFO * dlgInfo = NULL; DWORD units = GetDialogBaseUnits(); @@ -524,40 +526,63 @@ static HWND DIALOG_CreateIndirect( HINST if (template.style & DS_CONTROL) template.exStyle |= WS_EX_CONTROLPARENT; AdjustWindowRectEx( &rect, template.style, (hMenu != 0), template.exStyle ); - rect.right -= rect.left; - rect.bottom -= rect.top; + pos.x = rect.left; + pos.y = rect.top; + size.cx = rect.right - rect.left; + size.cy = rect.bottom - rect.top; if (template.x == CW_USEDEFAULT16) { - rect.left = rect.top = CW_USEDEFAULT; + pos.x = pos.y = CW_USEDEFAULT; } else { + HMONITOR monitor = 0; + MONITORINFO mon_info; + + mon_info.cbSize = sizeof(mon_info); if (template.style & DS_CENTER) { - rect.left = (GetSystemMetrics(SM_CXSCREEN) - rect.right) / 2; - rect.top = (GetSystemMetrics(SM_CYSCREEN) - rect.bottom) / 2; + if (!(monitor = MonitorFromWindow( owner ? owner : GetActiveWindow(), + MONITOR_DEFAULTTOPRIMARY ))) + { + pos.x = pos.y = 0; /* default to primary monitor */ + monitor = MonitorFromPoint( pos, MONITOR_DEFAULTTOPRIMARY ); + } + GetMonitorInfoW( monitor, &mon_info ); + pos.x = (mon_info.rcWork.left + mon_info.rcWork.right - size.cx) / 2; + pos.y = (mon_info.rcWork.top + mon_info.rcWork.bottom - size.cy) / 2; + } + else if (template.style & DS_CENTERMOUSE) + { + GetCursorPos( &pos ); + monitor = MonitorFromPoint( pos, MONITOR_DEFAULTTOPRIMARY ); + GetMonitorInfoW( monitor, &mon_info ); } else { - rect.left += MulDiv(template.x, xBaseUnit, 4); - rect.top += MulDiv(template.y, yBaseUnit, 8); + pos.x += MulDiv(template.x, xBaseUnit, 4); + pos.y += MulDiv(template.y, yBaseUnit, 8); + if (!(template.style & (WS_CHILD|DS_ABSALIGN))) ClientToScreen( owner, &pos ); } if ( !(template.style & WS_CHILD) ) { INT dX, dY; - if( !(template.style & DS_ABSALIGN) ) - ClientToScreen( owner, (POINT *)&rect ); - /* try to fit it into the desktop */ - if( (dX = rect.left + rect.right + GetSystemMetrics(SM_CXDLGFRAME) - - GetSystemMetrics(SM_CXSCREEN)) > 0 ) rect.left -= dX; - if( (dY = rect.top + rect.bottom + GetSystemMetrics(SM_CYDLGFRAME) - - GetSystemMetrics(SM_CYSCREEN)) > 0 ) rect.top -= dY; - if( rect.left < 0 ) rect.left = 0; - if( rect.top < 0 ) rect.top = 0; + if (!monitor) + { + SetRect( &rect, pos.x, pos.y, pos.x + size.cx, pos.y + size.cy ); + monitor = MonitorFromRect( &rect, MONITOR_DEFAULTTOPRIMARY ); + GetMonitorInfoW( monitor, &mon_info ); + } + if ((dX = pos.x + size.cx + GetSystemMetrics(SM_CXDLGFRAME) - mon_info.rcWork.right) > 0) + pos.x -= dX; + if ((dY = pos.y + size.cy + GetSystemMetrics(SM_CYDLGFRAME) - mon_info.rcWork.bottom) > 0) + pos.y -= dY; + if( pos.x < mon_info.rcWork.left ) pos.x = mon_info.rcWork.left; + if( pos.y < mon_info.rcWork.top ) pos.y = mon_info.rcWork.top; } } @@ -570,8 +595,7 @@ static HWND DIALOG_CreateIndirect( HINST if (unicode) { hwnd = CreateWindowExW(template.exStyle, template.className, template.caption, - template.style & ~WS_VISIBLE, - rect.left, rect.top, rect.right, rect.bottom, + template.style & ~WS_VISIBLE, pos.x, pos.y, size.cx, size.cy, owner, hMenu, hInst, NULL ); } else @@ -592,8 +616,7 @@ static HWND DIALOG_CreateIndirect( HINST WideCharToMultiByte( CP_ACP, 0, template.caption, -1, caption, len, NULL, NULL ); } hwnd = CreateWindowExA(template.exStyle, class, caption, - template.style & ~WS_VISIBLE, - rect.left, rect.top, rect.right, rect.bottom, + template.style & ~WS_VISIBLE, pos.x, pos.y, size.cx, size.cy, owner, hMenu, hInst, NULL ); if (HIWORD(class)) HeapFree( GetProcessHeap(), 0, class ); if (HIWORD(caption)) HeapFree( GetProcessHeap(), 0, caption ); diff --git a/dlls/user/dialog16.c b/dlls/user/dialog16.c index c7bb73f..2df59fc 100644 --- a/dlls/user/dialog16.c +++ b/dlls/user/dialog16.c @@ -290,6 +290,8 @@ static HWND DIALOG_CreateIndirect16( HIN { HWND hwnd; RECT rect; + POINT pos; + SIZE size; WND * wndPtr; DLG_TEMPLATE template; DIALOGINFO * dlgInfo; @@ -356,40 +358,63 @@ static HWND DIALOG_CreateIndirect16( HIN rect.bottom = MulDiv(template.cy, dlgInfo->yBaseUnit, 8); if (template.style & DS_MODALFRAME) exStyle |= WS_EX_DLGMODALFRAME; AdjustWindowRectEx( &rect, template.style, (dlgInfo->hMenu != 0), exStyle ); - rect.right -= rect.left; - rect.bottom -= rect.top; + pos.x = rect.left; + pos.y = rect.top; + size.cx = rect.right - rect.left; + size.cy = rect.bottom - rect.top; if (template.x == CW_USEDEFAULT16) { - rect.left = rect.top = CW_USEDEFAULT16; + pos.x = pos.y = CW_USEDEFAULT16; } else { + HMONITOR monitor = 0; + MONITORINFO mon_info; + + mon_info.cbSize = sizeof(mon_info); if (template.style & DS_CENTER) { - rect.left = (GetSystemMetrics(SM_CXSCREEN) - rect.right) / 2; - rect.top = (GetSystemMetrics(SM_CYSCREEN) - rect.bottom) / 2; + if (!(monitor = MonitorFromWindow( owner ? owner : GetActiveWindow(), + MONITOR_DEFAULTTOPRIMARY ))) + { + pos.x = pos.y = 0; /* default to primary monitor */ + monitor = MonitorFromPoint( pos, MONITOR_DEFAULTTOPRIMARY ); + } + GetMonitorInfoW( monitor, &mon_info ); + pos.x = (mon_info.rcWork.left + mon_info.rcWork.right - size.cx) / 2; + pos.y = (mon_info.rcWork.top + mon_info.rcWork.bottom - size.cy) / 2; + } + else if (template.style & DS_CENTERMOUSE) + { + GetCursorPos( &pos ); + monitor = MonitorFromPoint( pos, MONITOR_DEFAULTTOPRIMARY ); + GetMonitorInfoW( monitor, &mon_info ); } else { - rect.left += MulDiv(template.x, dlgInfo->xBaseUnit, 4); - rect.top += MulDiv(template.y, dlgInfo->yBaseUnit, 8); + pos.x += MulDiv(template.x, dlgInfo->xBaseUnit, 4); + pos.y += MulDiv(template.y, dlgInfo->yBaseUnit, 8); + if (!(template.style & (WS_CHILD|DS_ABSALIGN))) ClientToScreen( owner, &pos ); } if ( !(template.style & WS_CHILD) ) { - INT16 dX, dY; - - if( !(template.style & DS_ABSALIGN) ) - ClientToScreen( owner, (POINT *)&rect ); + INT dX, dY; /* try to fit it into the desktop */ - if( (dX = rect.left + rect.right + GetSystemMetrics(SM_CXDLGFRAME) - - GetSystemMetrics(SM_CXSCREEN)) > 0 ) rect.left -= dX; - if( (dY = rect.top + rect.bottom + GetSystemMetrics(SM_CYDLGFRAME) - - GetSystemMetrics(SM_CYSCREEN)) > 0 ) rect.top -= dY; - if( rect.left < 0 ) rect.left = 0; - if( rect.top < 0 ) rect.top = 0; + if (!monitor) + { + SetRect( &rect, pos.x, pos.y, pos.x + size.cx, pos.y + size.cy ); + monitor = MonitorFromRect( &rect, MONITOR_DEFAULTTOPRIMARY ); + GetMonitorInfoW( monitor, &mon_info ); + } + if ((dX = pos.x + size.cx + GetSystemMetrics(SM_CXDLGFRAME) - mon_info.rcWork.right) > 0) + pos.x -= dX; + if ((dY = pos.y + size.cy + GetSystemMetrics(SM_CYDLGFRAME) - mon_info.rcWork.bottom) > 0) + pos.y -= dY; + if( pos.x < mon_info.rcWork.left ) pos.x = mon_info.rcWork.left; + if( pos.y < mon_info.rcWork.top ) pos.y = mon_info.rcWork.top; } } @@ -401,7 +426,7 @@ static HWND DIALOG_CreateIndirect16( HIN hwnd = WIN_Handle32( CreateWindowEx16(exStyle, template.className, template.caption, template.style & ~WS_VISIBLE, - rect.left, rect.top, rect.right, rect.bottom, + pos.x, pos.y, size.cx, size.cy, HWND_16(owner), HMENU_16(dlgInfo->hMenu), hInst, NULL )); if (!hwnd)
1
0
0
0
Alexandre Julliard : user: Take multiple monitors into account when placing a window.
by Alexandre Julliard
23 Oct '06
23 Oct '06
Module: wine Branch: master Commit: 4c0ae56c0ec9b60e5ba850d2df20ca0cafc6970b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4c0ae56c0ec9b60e5ba850d2d…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Oct 23 14:03:41 2006 +0200 user: Take multiple monitors into account when placing a window. --- dlls/user/win.c | 119 +++++++++++++++++++++++-------------------------------- 1 files changed, 50 insertions(+), 69 deletions(-) diff --git a/dlls/user/win.c b/dlls/user/win.c index a6f1b37..d52cac0 100644 --- a/dlls/user/win.c +++ b/dlls/user/win.c @@ -667,10 +667,10 @@ void WIN_DestroyThreadWindows( HWND hwnd * * Fix the coordinates - Helper for WIN_CreateWindowEx. * returns default show mode in sw. - * Note: the feature presented as undocumented *is* in the MSDN since 1993. */ static void WIN_FixCoordinates( CREATESTRUCTA *cs, INT *sw) { +#define IS_DEFAULT(x) ((x) == CW_USEDEFAULT || (x) == CW_USEDEFAULT16) POINT pos[2]; if (cs->dwExStyle & WS_EX_MDICHILD) @@ -683,97 +683,78 @@ static void WIN_FixCoordinates( CREATEST TRACE("MDI child id %04x\n", id); } - if (cs->x == CW_USEDEFAULT || cs->x == CW_USEDEFAULT16 || - cs->cx == CW_USEDEFAULT || cs->cx == CW_USEDEFAULT16) + if (cs->style & (WS_CHILD | WS_POPUP)) { - if (cs->style & (WS_CHILD | WS_POPUP)) + if (cs->dwExStyle & WS_EX_MDICHILD) { - if (cs->dwExStyle & WS_EX_MDICHILD) + if (IS_DEFAULT(cs->x)) { - if (cs->x == CW_USEDEFAULT || cs->x == CW_USEDEFAULT16) - { - cs->x = pos[0].x; - cs->y = pos[0].y; - } - if (cs->cx == CW_USEDEFAULT || cs->cx == CW_USEDEFAULT16 || !cs->cx) - cs->cx = pos[1].x; - if (cs->cy == CW_USEDEFAULT || cs->cy == CW_USEDEFAULT16 || !cs->cy) - cs->cy = pos[1].y; - } - else - { - if (cs->x == CW_USEDEFAULT || cs->x == CW_USEDEFAULT16) - cs->x = cs->y = 0; - if (cs->cx == CW_USEDEFAULT || cs->cx == CW_USEDEFAULT16) - cs->cx = cs->cy = 0; + cs->x = pos[0].x; + cs->y = pos[0].y; } + if (IS_DEFAULT(cs->cx) || !cs->cx) cs->cx = pos[1].x; + if (IS_DEFAULT(cs->cy) || !cs->cy) cs->cy = pos[1].y; } - else /* overlapped window */ + else { - STARTUPINFOW info; + if (IS_DEFAULT(cs->x)) cs->x = cs->y = 0; + if (IS_DEFAULT(cs->cx)) cs->cx = cs->cy = 0; + } + } + else /* overlapped window */ + { + HMONITOR monitor; + MONITORINFO mon_info; + STARTUPINFOW info; + POINT pt; - GetStartupInfoW( &info ); + if (!IS_DEFAULT(cs->x) && !IS_DEFAULT(cs->cx) && !IS_DEFAULT(cs->cy)) return; - if (cs->x == CW_USEDEFAULT || cs->x == CW_USEDEFAULT16) + if (!(monitor = MonitorFromWindow( cs->hwndParent, MONITOR_DEFAULTTOPRIMARY ))) + { + pt.x = pt.y = 0; /* default to primary monitor */ + if (!IS_DEFAULT(cs->x)) { - /* Never believe Microsoft's documentation... CreateWindowEx doc says - * that if an overlapped window is created with WS_VISIBLE style bit - * set and the x parameter is set to CW_USEDEFAULT, the system ignores - * the y parameter. However, disassembling NT implementation (WIN32K.SYS) - * reveals that - * - * 1) not only it checks for CW_USEDEFAULT but also for CW_USEDEFAULT16 - * 2) it does not ignore the y parameter as the docs claim; instead, it - * uses it as second parameter to ShowWindow() unless y is either - * CW_USEDEFAULT or CW_USEDEFAULT16. - * - * The fact that we didn't do 2) caused bogus windows pop up when wine - * was running apps that were using this obscure feature. Example - - * calc.exe that comes with Win98 (only Win98, it's different from - * the one that comes with Win95 and NT) - */ - if (cs->y != CW_USEDEFAULT && cs->y != CW_USEDEFAULT16) *sw = cs->y; - cs->x = (info.dwFlags & STARTF_USEPOSITION) ? info.dwX : 0; - cs->y = (info.dwFlags & STARTF_USEPOSITION) ? info.dwY : 0; + pt.x = cs->x; + pt.y = cs->y; } + monitor = MonitorFromPoint( pt, MONITOR_DEFAULTTOPRIMARY ); + } + mon_info.cbSize = sizeof(mon_info); + GetMonitorInfoW( monitor, &mon_info ); + GetStartupInfoW( &info ); - if (cs->cx == CW_USEDEFAULT || cs->cx == CW_USEDEFAULT16) + if (IS_DEFAULT(cs->x)) + { + if (!IS_DEFAULT(cs->y)) *sw = cs->y; + cs->x = (info.dwFlags & STARTF_USEPOSITION) ? info.dwX : mon_info.rcWork.left; + cs->y = (info.dwFlags & STARTF_USEPOSITION) ? info.dwY : mon_info.rcWork.top; + } + + if (IS_DEFAULT(cs->cx)) + { + if (info.dwFlags & STARTF_USESIZE) { - if (info.dwFlags & STARTF_USESIZE) - { - cs->cx = info.dwXSize; - cs->cy = info.dwYSize; - } - else /* if no other hint from the app, pick 3/4 of the screen real estate */ - { - RECT r; - SystemParametersInfoW( SPI_GETWORKAREA, 0, &r, 0); - cs->cx = (((r.right - r.left) * 3) / 4) - cs->x; - cs->cy = (((r.bottom - r.top) * 3) / 4) - cs->y; - } + cs->cx = info.dwXSize; + cs->cy = info.dwYSize; } - /* Handle case where only the cy values is set to default */ - else if (cs->cy == CW_USEDEFAULT || cs->cy == CW_USEDEFAULT16) + else { - RECT r; - SystemParametersInfoW( SPI_GETWORKAREA, 0, &r, 0); - cs->cy = (((r.bottom - r.top) * 3) / 4) - cs->y; + cs->cx = (mon_info.rcWork.right - mon_info.rcWork.left) * 3 / 4 - cs->x; + cs->cy = (mon_info.rcWork.bottom - mon_info.rcWork.top) * 3 / 4 - cs->y; } } - } - else - { /* neither x nor cx are default. Check the y values . * In the trace we see Outlook and Outlook Express using * cy set to CW_USEDEFAULT when opening the address book. */ - if (cs->cy == CW_USEDEFAULT || cs->cy == CW_USEDEFAULT16) { - RECT r; + else if (IS_DEFAULT(cs->cy)) + { FIXME("Strange use of CW_USEDEFAULT in nHeight\n"); - SystemParametersInfoW( SPI_GETWORKAREA, 0, &r, 0); - cs->cy = (((r.bottom - r.top) * 3) / 4) - cs->y; + cs->cy = (mon_info.rcWork.bottom - mon_info.rcWork.top) * 3 / 4 - cs->y; } } +#undef IS_DEFAULT } /***********************************************************************
1
0
0
0
Alexandre Julliard : user: Take multiple monitors into account when placing a popup menu.
by Alexandre Julliard
23 Oct '06
23 Oct '06
Module: wine Branch: master Commit: a3fcd5609bb95cd508a10b3618230235b39fd8a5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a3fcd5609bb95cd508a10b361…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Oct 23 14:03:26 2006 +0200 user: Take multiple monitors into account when placing a popup menu. --- dlls/user/menu.c | 25 +++++++++++++++++-------- 1 files changed, 17 insertions(+), 8 deletions(-) diff --git a/dlls/user/menu.c b/dlls/user/menu.c index 19c73f3..e157e04 100644 --- a/dlls/user/menu.c +++ b/dlls/user/menu.c @@ -1772,6 +1772,9 @@ static BOOL MENU_ShowPopup( HWND hwndOwn { POPUPMENU *menu; UINT width, height; + POINT pt; + HMONITOR monitor; + MONITORINFO info; TRACE("owner=%p hmenu=%p id=0x%04x x=0x%04x y=0x%04x xa=0x%04x ya=0x%04x\n", hwndOwner, hmenu, id, x, y, xanchor, yanchor); @@ -1794,25 +1797,31 @@ static BOOL MENU_ShowPopup( HWND hwndOwn width = menu->Width + GetSystemMetrics(SM_CXBORDER); height = menu->Height + GetSystemMetrics(SM_CYBORDER); - if( x + width > GetSystemMetrics(SM_CXSCREEN )) + /* FIXME: should use item rect */ + pt.x = x; + pt.y = y; + monitor = MonitorFromPoint( pt, MONITOR_DEFAULTTONEAREST ); + info.cbSize = sizeof(info); + GetMonitorInfoW( monitor, &info ); + if( x + width > info.rcWork.right) { if( xanchor && x >= width - xanchor ) x -= width - xanchor; - if( x + width > GetSystemMetrics(SM_CXSCREEN)) - x = GetSystemMetrics(SM_CXSCREEN) - width; + if( x + width > info.rcWork.right) + x = info.rcWork.right - width; } - if( x < 0 ) x = 0; + if( x < info.rcWork.left ) x = info.rcWork.left; - if( y + height > GetSystemMetrics(SM_CYSCREEN )) + if( y + height > info.rcWork.bottom) { if( yanchor && y >= height + yanchor ) y -= height + yanchor; - if( y + height > GetSystemMetrics(SM_CYSCREEN )) - y = GetSystemMetrics(SM_CYSCREEN) - height; + if( y + height > info.rcWork.bottom) + y = info.rcWork.bottom - height; } - if( y < 0 ) y = 0; + if( y < info.rcWork.top ) y = info.rcWork.top; /* NOTE: In Windows, top menu popup is not owned. */ menu->hWnd = CreateWindowExW( 0, POPUPMENU_CLASS_ATOMW, NULL,
1
0
0
0
Alexandre Julliard : user: Moved GetMonitorInfo and EnumDisplayMonitors to the display driver.
by Alexandre Julliard
23 Oct '06
23 Oct '06
Module: wine Branch: master Commit: 8a8903516c712ed0ca3643a7a622461105ab7ade URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8a8903516c712ed0ca3643a7a…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Oct 23 13:51:30 2006 +0200 user: Moved GetMonitorInfo and EnumDisplayMonitors to the display driver. Added Xinerama support for these functions. --- dlls/user/driver.c | 26 ++++++ dlls/user/misc.c | 181 ++++++++++++++++--------------------- dlls/user/user_private.h | 2 + dlls/winex11.drv/winex11.drv.spec | 2 + dlls/winex11.drv/xinerama.c | 76 +++++++++++++++- 5 files changed, 183 insertions(+), 104 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=8a8903516c712ed0ca364…
1
0
0
0
Alexandre Julliard : winex11.drv: Preliminary support for Xinerama.
by Alexandre Julliard
23 Oct '06
23 Oct '06
Module: wine Branch: master Commit: 3c305f9db9f8f00eba261e2c028368c2f27f5281 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3c305f9db9f8f00eba261e2c0…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Oct 23 14:37:17 2006 +0200 winex11.drv: Preliminary support for Xinerama. --- dlls/winex11.drv/Makefile.in | 1 + dlls/winex11.drv/bitblt.c | 2 +- dlls/winex11.drv/desktop.c | 1 + dlls/winex11.drv/window.c | 14 ++-- dlls/winex11.drv/winpos.c | 3 +- dlls/winex11.drv/x11drv.h | 3 + dlls/winex11.drv/x11drv_main.c | 6 ++ dlls/winex11.drv/xinerama.c | 156 ++++++++++++++++++++++++++++++++++++++++ 8 files changed, 178 insertions(+), 8 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=3c305f9db9f8f00eba261…
1
0
0
0
Alexandre Julliard : configure: Check for the Xinerama extension.
by Alexandre Julliard
23 Oct '06
23 Oct '06
Module: wine Branch: master Commit: 7d00b0504e2b56e141a1fa145ac0ae722b1143a0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7d00b0504e2b56e141a1fa145…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Oct 23 13:46:34 2006 +0200 configure: Check for the Xinerama extension. --- configure | 162 +++++++++++++++++++++++++++++++++++++++++++++++++++ configure.ac | 11 ++++ include/config.h.in | 9 +++ 3 files changed, 182 insertions(+), 0 deletions(-) diff --git a/configure b/configure index d74403e..7a88e49 100755 --- a/configure +++ b/configure @@ -8659,12 +8659,14 @@ then + for ac_header in X11/Xlib.h \ X11/XKBlib.h \ X11/Xutil.h \ X11/extensions/shape.h \ X11/extensions/XInput.h \ X11/extensions/XShm.h \ + X11/extensions/Xinerama.h \ X11/extensions/Xrandr.h \ X11/extensions/Xrender.h \ X11/extensions/xf86vmode.h @@ -9261,6 +9263,74 @@ fi fi + if test "$ac_cv_header_X11_extensions_Xinerama_h" = "yes" + then + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <X11/Xlib.h> +#include <X11/extensions/Xinerama.h> +int +main () +{ +static typeof(XineramaQueryScreens) * func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LIBXINERAMA 1 +_ACEOF + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + + if test "x$with_opengl" != "xno" then @@ -16614,6 +16684,98 @@ _ACEOF fi + { echo "$as_me:$LINENO: checking for -lXinerama soname" >&5 +echo $ECHO_N "checking for -lXinerama soname... $ECHO_C" >&6; } +if test "${ac_cv_lib_soname_Xinerama+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_get_soname_save_LIBS=$LIBS +LIBS="-lXinerama $X_LIBS -lXext -lX11 $X_EXTRA_LIBS $LIBS" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char XineramaQueryScreens (); +int +main () +{ +return XineramaQueryScreens (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + case "$LIBEXT" in + dylib) ac_cv_lib_soname_Xinerama=`otool -L conftest$ac_exeext | grep libXinerama\\.[0-9A-Za-z.]*dylib | sed -e "s/^.*\/\(libXinerama\.[0-9A-Za-z.]*dylib\).*$/\1/"';2,$d'` ;; + so) ac_cv_lib_soname_Xinerama=`$ac_cv_path_LDD conftest$ac_exeext | grep libXinerama\\.so | sed -e "s/^.*\(libXinerama\.so[^ ]*\).*$/\1/"';2,$d'` ;; + esac + if test "x$ac_cv_lib_soname_Xinerama" = "x" + then + ac_cv_lib_soname_Xinerama="libXinerama.$LIBEXT" + fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_soname_Xinerama="libXinerama.$LIBEXT" +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_get_soname_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_soname_Xinerama" >&5 +echo "${ECHO_T}$ac_cv_lib_soname_Xinerama" >&6; } +if test "${ac_cv_lib_soname_Xinerama+set}" = set; then + +cat >>confdefs.h <<_ACEOF +#define SONAME_LIBXINERAMA "$ac_cv_lib_soname_Xinerama" +_ACEOF + +fi + { echo "$as_me:$LINENO: checking for -lXrender soname" >&5 echo $ECHO_N "checking for -lXrender soname... $ECHO_C" >&6; } if test "${ac_cv_lib_soname_Xrender+set}" = set; then diff --git a/configure.ac b/configure.ac index 541275a..954619a 100644 --- a/configure.ac +++ b/configure.ac @@ -328,6 +328,7 @@ then X11/extensions/shape.h \ X11/extensions/XInput.h \ X11/extensions/XShm.h \ + X11/extensions/Xinerama.h \ X11/extensions/Xrandr.h \ X11/extensions/Xrender.h \ X11/extensions/xf86vmode.h],,, @@ -388,6 +389,15 @@ #include <X11/extensions/Xrandr.h>],[sta [Define if Xrender has the XRenderSetPictureTransform function])],, $X_LIBS -lXext -lX11 $X_EXTRA_LIBS) fi + + dnl *** Check for Xinerama extension + if test "$ac_cv_header_X11_extensions_Xinerama_h" = "yes" + then + AC_TRY_COMPILE([#include <X11/Xlib.h> +#include <X11/extensions/Xinerama.h>],[static typeof(XineramaQueryScreens) * func;], + [AC_DEFINE(HAVE_LIBXINERAMA, 1, [Define if you have the Xinerama library])]) + fi + dnl *** End of X11/Xlib.h check dnl Check for the presence of OpenGL @@ -1133,6 +1143,7 @@ then WINE_GET_SONAME(X11,XCreateWindow,[$X_LIBS $X_EXTRA_LIBS]) WINE_GET_SONAME(Xext,XextCreateExtension,[$X_LIBS -lX11 $X_EXTRA_LIBS]) WINE_GET_SONAME(Xi,XOpenDevice,[$X_LIBS -lXext -lX11 $X_EXTRA_LIBS]) + WINE_GET_SONAME(Xinerama,XineramaQueryScreens,[$X_LIBS -lXext -lX11 $X_EXTRA_LIBS]) WINE_GET_SONAME(Xrender,XRenderQueryExtension,[$X_LIBS -lXext -lX11 $X_EXTRA_LIBS]) WINE_GET_SONAME(Xrandr,XRRQueryExtension,[$X_LIBS -lXext -lX11 $X_EXTRA_LIBS]) WINE_GET_SONAME(freetype,FT_Init_FreeType,[$X_LIBS]) diff --git a/include/config.h.in b/include/config.h.in index 3869898..ce6dd73 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -320,6 +320,9 @@ #undef HAVE_LIBRESOLV /* Define to 1 if you have the `socket' library (-lsocket). */ #undef HAVE_LIBSOCKET +/* Define if you have the Xinerama library */ +#undef HAVE_LIBXINERAMA + /* Define if you have the libxml2 library */ #undef HAVE_LIBXML2 @@ -896,6 +899,9 @@ #undef HAVE_X11_EXTENSIONS_SHAPE_H /* Define to 1 if you have the <X11/extensions/xf86vmode.h> header file. */ #undef HAVE_X11_EXTENSIONS_XF86VMODE_H +/* Define to 1 if you have the <X11/extensions/Xinerama.h> header file. */ +#undef HAVE_X11_EXTENSIONS_XINERAMA_H + /* Define to 1 if you have the <X11/extensions/XInput.h> header file. */ #undef HAVE_X11_EXTENSIONS_XINPUT_H @@ -1013,6 +1019,9 @@ #undef SONAME_LIBXEXT /* Define to the soname of the libXi library. */ #undef SONAME_LIBXI +/* Define to the soname of the libXinerama library. */ +#undef SONAME_LIBXINERAMA + /* Define to the soname of the libXrandr library. */ #undef SONAME_LIBXRANDR
1
0
0
0
← Newer
1
...
23
24
25
26
27
28
29
...
104
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
Results per page:
10
25
50
100
200