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
April 2017
----- 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
2 participants
757 discussions
Start a n
N
ew thread
Nikolay Sivov : dwrite: Update overhangs rectangle on alignment changes.
by Alexandre Julliard
25 Apr '17
25 Apr '17
Module: wine Branch: master Commit: ace830625d09dbb384cff19ff9723265357990a8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ace830625d09dbb384cff19ff…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Apr 25 08:54:43 2017 +0300 dwrite: Update overhangs rectangle on alignment changes. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dwrite/layout.c | 51 +++++++++++++++++++++++++++++++-------------------- 1 file changed, 31 insertions(+), 20 deletions(-) diff --git a/dlls/dwrite/layout.c b/dlls/dwrite/layout.c index c988c75..ab68ecf 100644 --- a/dlls/dwrite/layout.c +++ b/dlls/dwrite/layout.c @@ -188,6 +188,7 @@ struct layout_effective_run { UINT16 *clustermap; /* effective clustermap, allocated separately, is not reused from nominal map */ UINT32 line; /* 0-based line index in line metrics array */ BOOL underlined; /* set if this run is underlined */ + D2D1_RECT_F bbox; /* ink run box, top == bottom means it wasn't estimated yet */ }; struct layout_effective_inline { @@ -1249,6 +1250,7 @@ static HRESULT layout_add_effective_run(struct dwrite_textlayout *layout, const run->start = start = layout->clusters[first_cluster].position; run->length = length; run->width = get_cluster_range_width(layout, first_cluster, first_cluster + cluster_count); + memset(&run->bbox, 0, sizeof(run->bbox)); /* Check if run direction matches paragraph direction, if it doesn't adjust by run width */ @@ -3581,25 +3583,28 @@ static void layout_get_erun_bbox(struct dwrite_textlayout *layout, struct layout D2D1_POINT_2F origin = { 0 }; UINT32 i; - IDWriteFontFace_GetMetrics(glyph_run->fontFace, &font_metrics); + if (run->bbox.top == run->bbox.bottom) { + IDWriteFontFace_GetMetrics(glyph_run->fontFace, &font_metrics); - origin.x = run->origin.x + run->align_dx; - origin.y = run->origin.y; - for (i = 0; i < run->glyphcount; i++) { - D2D1_RECT_F glyph_bbox; - RECT design_bbox; + for (i = 0; i < run->glyphcount; i++) { + D2D1_RECT_F glyph_bbox; + RECT design_bbox; - freetype_get_design_glyph_bbox((IDWriteFontFace4 *)glyph_run->fontFace, font_metrics.designUnitsPerEm, - glyph_run->glyphIndices[i + start_glyph], &design_bbox); + freetype_get_design_glyph_bbox((IDWriteFontFace4 *)glyph_run->fontFace, font_metrics.designUnitsPerEm, + glyph_run->glyphIndices[i + start_glyph], &design_bbox); - scale_glyph_bbox(&design_bbox, glyph_run->fontEmSize, font_metrics.designUnitsPerEm, &glyph_bbox); - d2d_rect_offset(&glyph_bbox, origin.x + glyph_run->glyphOffsets[i + start_glyph].advanceOffset, - origin.y + glyph_run->glyphOffsets[i + start_glyph].ascenderOffset); - d2d_rect_union(bbox, &glyph_bbox); + scale_glyph_bbox(&design_bbox, glyph_run->fontEmSize, font_metrics.designUnitsPerEm, &glyph_bbox); + d2d_rect_offset(&glyph_bbox, origin.x + glyph_run->glyphOffsets[i + start_glyph].advanceOffset, + origin.y + glyph_run->glyphOffsets[i + start_glyph].ascenderOffset); + d2d_rect_union(&run->bbox, &glyph_bbox); - /* FIXME: take care of vertical/rtl */ - origin.x += glyph_run->glyphAdvances[i + start_glyph]; + /* FIXME: take care of vertical/rtl */ + origin.x += glyph_run->glyphAdvances[i + start_glyph]; + } } + + *bbox = run->bbox; + d2d_rect_offset(bbox, run->origin.x + run->align_dx, run->origin.y); } static HRESULT WINAPI dwritetextlayout_GetOverhangMetrics(IDWriteTextLayout3 *iface, @@ -4091,9 +4096,12 @@ static HRESULT WINAPI dwritetextformat_layout_SetTextAlignment(IDWriteTextFormat if (FAILED(hr)) return hr; - /* if layout is not ready there's nothing to align */ - if (changed && !(This->recompute & RECOMPUTE_LINES)) - layout_apply_text_alignment(This); + if (changed) { + /* if layout is not ready there's nothing to align */ + if (!(This->recompute & RECOMPUTE_LINES)) + layout_apply_text_alignment(This); + This->recompute |= RECOMPUTE_OVERHANGS; + } return S_OK; } @@ -4110,9 +4118,12 @@ static HRESULT WINAPI dwritetextformat_layout_SetParagraphAlignment(IDWriteTextF if (FAILED(hr)) return hr; - /* if layout is not ready there's nothing to align */ - if (changed && !(This->recompute & RECOMPUTE_LINES)) - layout_apply_par_alignment(This); + if (changed) { + /* if layout is not ready there's nothing to align */ + if (!(This->recompute & RECOMPUTE_LINES)) + layout_apply_par_alignment(This); + This->recompute |= RECOMPUTE_OVERHANGS; + } return S_OK; }
1
0
0
0
Nikolay Sivov : dwrite: Extract supported image formats from 'sbix' table.
by Alexandre Julliard
25 Apr '17
25 Apr '17
Module: wine Branch: master Commit: 7cb57e2ee852531110130e90c97280307f0584db URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7cb57e2ee852531110130e90c…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Apr 25 08:54:42 2017 +0300 dwrite: Extract supported image formats from 'sbix' table. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dwrite/opentype.c | 100 +++++++++++++++++++++++++++++++++++++++++++++++ dlls/dwrite/tests/font.c | 99 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 199 insertions(+) diff --git a/dlls/dwrite/opentype.c b/dlls/dwrite/opentype.c index 99531a6..1651729 100644 --- a/dlls/dwrite/opentype.c +++ b/dlls/dwrite/opentype.c @@ -38,6 +38,13 @@ WINE_DEFAULT_DEBUG_CHANNEL(dwrite); #define MS_CFF__TAG DWRITE_MAKE_OPENTYPE_TAG('C','F','F',' ') #define MS_COLR_TAG DWRITE_MAKE_OPENTYPE_TAG('C','O','L','R') #define MS_SVG__TAG DWRITE_MAKE_OPENTYPE_TAG('S','V','G',' ') +#define MS_SBIX_TAG DWRITE_MAKE_OPENTYPE_TAG('s','b','i','x') +#define MS_MAXP_TAG DWRITE_MAKE_OPENTYPE_TAG('m','a','x','p') + +/* 'sbix' formats */ +#define MS_PNG__TAG DWRITE_MAKE_OPENTYPE_TAG('p','n','g',' ') +#define MS_JPG__TAG DWRITE_MAKE_OPENTYPE_TAG('j','p','g',' ') +#define MS_TIFF_TAG DWRITE_MAKE_OPENTYPE_TAG('t','i','f','f') #ifdef WORDS_BIGENDIAN #define GET_BE_WORD(x) (x) @@ -226,6 +233,31 @@ typedef struct { USHORT numberOfHMetrics; } TT_HHEA; +typedef struct { + WORD version; + WORD flags; + DWORD numStrikes; + DWORD strikeOffset[1]; +} sbix_header; + +typedef struct { + WORD ppem; + WORD ppi; + DWORD glyphDataOffsets[1]; +} sbix_strike; + +typedef struct { + WORD originOffsetX; + WORD originOffsetY; + DWORD graphicType; + BYTE data[1]; +} sbix_glyph_data; + +typedef struct { + DWORD version; + WORD numGlyphs; +} maxp; + #include "poppack.h" enum OS2_FSSELECTION { @@ -2057,6 +2089,71 @@ static BOOL opentype_has_font_table(IDWriteFontFace4 *fontface, UINT32 tag) return exists; } +static DWORD opentype_get_sbix_formats(IDWriteFontFace4 *fontface) +{ + UINT32 size, s, num_strikes; + const sbix_header *header; + UINT16 g, num_glyphs; + BOOL exists = FALSE; + const maxp *maxp; + const void *data; + DWORD ret = 0; + void *context; + HRESULT hr; + + hr = IDWriteFontFace4_TryGetFontTable(fontface, MS_MAXP_TAG, &data, &size, &context, &exists); + if (FAILED(hr) || !exists) + return 0; + + maxp = data; + num_glyphs = GET_BE_WORD(maxp->numGlyphs); + + IDWriteFontFace4_ReleaseFontTable(fontface, context); + + if (FAILED(IDWriteFontFace4_TryGetFontTable(fontface, MS_SBIX_TAG, &data, &size, &context, &exists))) { + WARN("Failed to get 'sbix' table, %#x\n", hr); + return 0; + } + + header = data; + num_strikes = GET_BE_DWORD(header->numStrikes); + + for (s = 0; s < num_strikes; s++) { + sbix_strike *strike = (sbix_strike *)((BYTE *)header + GET_BE_DWORD(header->strikeOffset[s])); + + for (g = 0; g < num_glyphs; g++) { + DWORD offset = GET_BE_DWORD(strike->glyphDataOffsets[g]); + DWORD offset_next = GET_BE_DWORD(strike->glyphDataOffsets[g + 1]); + sbix_glyph_data *glyph_data; + DWORD format; + + if (offset == offset_next) + continue; + + glyph_data = (sbix_glyph_data *)((BYTE *)strike + offset); + switch (format = glyph_data->graphicType) + { + case MS_PNG__TAG: + ret |= DWRITE_GLYPH_IMAGE_FORMATS_PNG; + break; + case MS_JPG__TAG: + ret |= DWRITE_GLYPH_IMAGE_FORMATS_JPEG; + break; + case MS_TIFF_TAG: + ret |= DWRITE_GLYPH_IMAGE_FORMATS_TIFF; + break; + default: + format = GET_BE_DWORD(format); + FIXME("unexpected bitmap format %s\n", debugstr_an((char *)&format, 4)); + } + } + } + + IDWriteFontFace4_ReleaseFontTable(fontface, context); + + return ret; +} + UINT32 opentype_get_glyph_image_formats(IDWriteFontFace4 *fontface) { UINT32 ret = DWRITE_GLYPH_IMAGE_FORMATS_NONE; @@ -2073,6 +2170,9 @@ UINT32 opentype_get_glyph_image_formats(IDWriteFontFace4 *fontface) if (opentype_has_font_table(fontface, MS_SVG__TAG)) ret |= DWRITE_GLYPH_IMAGE_FORMATS_SVG; + if (opentype_has_font_table(fontface, MS_SBIX_TAG)) + ret |= opentype_get_sbix_formats(fontface); + /* TODO: handle embedded bitmaps tables */ return ret; } diff --git a/dlls/dwrite/tests/font.c b/dlls/dwrite/tests/font.c index 9fd8258..980278e 100644 --- a/dlls/dwrite/tests/font.c +++ b/dlls/dwrite/tests/font.c @@ -46,6 +46,13 @@ #define MS_CFF__TAG DWRITE_MAKE_OPENTYPE_TAG('C','F','F',' ') #define MS_COLR_TAG DWRITE_MAKE_OPENTYPE_TAG('C','O','L','R') #define MS_SVG__TAG DWRITE_MAKE_OPENTYPE_TAG('S','V','G',' ') +#define MS_SBIX_TAG DWRITE_MAKE_OPENTYPE_TAG('s','b','i','x') +#define MS_MAXP_TAG DWRITE_MAKE_OPENTYPE_TAG('m','a','x','p') + +/* 'sbix' formats */ +#define MS_PNG__TAG DWRITE_MAKE_OPENTYPE_TAG('p','n','g',' ') +#define MS_JPG__TAG DWRITE_MAKE_OPENTYPE_TAG('j','p','g',' ') +#define MS_TIFF_TAG DWRITE_MAKE_OPENTYPE_TAG('t','i','f','f') #ifdef WORDS_BIGENDIAN #define GET_BE_WORD(x) (x) @@ -302,6 +309,31 @@ typedef struct { DWORD ExtensionOffset; } GSUB_ExtensionPosFormat1; +typedef struct { + WORD version; + WORD flags; + DWORD numStrikes; + DWORD strikeOffset[1]; +} sbix_header; + +typedef struct { + WORD ppem; + WORD ppi; + DWORD glyphDataOffsets[1]; +} sbix_strike; + +typedef struct { + WORD originOffsetX; + WORD originOffsetY; + DWORD graphicType; + BYTE data[1]; +} sbix_glyph_data; + +typedef struct { + DWORD version; + WORD numGlyphs; +} maxp; + #include "poppack.h" static IDWriteFactory *create_factory(void) @@ -7424,6 +7456,70 @@ static BOOL face_has_table(IDWriteFontFace4 *fontface, UINT32 tag) return exists; } +static DWORD get_sbix_formats(IDWriteFontFace4 *fontface) +{ + UINT32 size, s, num_strikes; + const sbix_header *header; + UINT16 g, num_glyphs; + BOOL exists = FALSE; + const maxp *maxp; + const void *data; + DWORD ret = 0; + void *context; + HRESULT hr; + + hr = IDWriteFontFace4_TryGetFontTable(fontface, MS_MAXP_TAG, &data, &size, &context, &exists); + ok(hr == S_OK, "TryGetFontTable() failed, %#x\n", hr); + ok(exists, "Expected maxp table\n"); + + if (!exists) + return 0; + + maxp = data; + num_glyphs = GET_BE_WORD(maxp->numGlyphs); + + hr = IDWriteFontFace4_TryGetFontTable(fontface, MS_SBIX_TAG, &data, &size, &context, &exists); + ok(hr == S_OK, "TryGetFontTable() failed, %#x\n", hr); + ok(exists, "Expected sbix table\n"); + + header = data; + num_strikes = GET_BE_DWORD(header->numStrikes); + + for (s = 0; s < num_strikes; s++) { + sbix_strike *strike = (sbix_strike *)((BYTE *)header + GET_BE_DWORD(header->strikeOffset[s])); + + for (g = 0; g < num_glyphs; g++) { + DWORD offset = GET_BE_DWORD(strike->glyphDataOffsets[g]); + DWORD offset_next = GET_BE_DWORD(strike->glyphDataOffsets[g + 1]); + sbix_glyph_data *glyph_data; + DWORD format; + + if (offset == offset_next) + continue; + + glyph_data = (sbix_glyph_data *)((BYTE *)strike + offset); + switch (format = glyph_data->graphicType) + { + case MS_PNG__TAG: + ret |= DWRITE_GLYPH_IMAGE_FORMATS_PNG; + break; + case MS_JPG__TAG: + ret |= DWRITE_GLYPH_IMAGE_FORMATS_JPEG; + break; + case MS_TIFF_TAG: + ret |= DWRITE_GLYPH_IMAGE_FORMATS_TIFF; + break; + default: + ok(0, "unexpected format, %#x\n", GET_BE_DWORD(format)); + } + } + } + + IDWriteFontFace4_ReleaseFontTable(fontface, context); + + return ret; +} + static DWORD get_face_glyph_image_formats(IDWriteFontFace4 *fontface) { DWORD ret = DWRITE_GLYPH_IMAGE_FORMATS_NONE; @@ -7440,6 +7536,9 @@ static DWORD get_face_glyph_image_formats(IDWriteFontFace4 *fontface) if (face_has_table(fontface, MS_SVG__TAG)) ret |= DWRITE_GLYPH_IMAGE_FORMATS_SVG; + if (face_has_table(fontface, MS_SBIX_TAG)) + ret |= get_sbix_formats(fontface); + /* TODO: handle embedded bitmaps tables */ return ret; }
1
0
0
0
Nikolay Sivov : uxtheme: Fix buffer dc origin and clipping.
by Alexandre Julliard
25 Apr '17
25 Apr '17
Module: wine Branch: master Commit: 849c4716c14507ab447f0ac5725b9636ee1a3094 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=849c4716c14507ab447f0ac57…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Apr 25 08:54:07 2017 +0300 uxtheme: Fix buffer dc origin and clipping. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/uxtheme/buffer.c | 4 +++- dlls/uxtheme/tests/system.c | 55 ++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 57 insertions(+), 2 deletions(-) diff --git a/dlls/uxtheme/buffer.c b/dlls/uxtheme/buffer.c index bbf4c9d..664515c 100644 --- a/dlls/uxtheme/buffer.c +++ b/dlls/uxtheme/buffer.c @@ -137,6 +137,8 @@ HPAINTBUFFER WINAPI BeginBufferedPaint(HDC targetdc, const RECT *rect, return NULL; } + SetWindowOrgEx(buffer->memorydc, rect->left, rect->top, NULL); + IntersectClipRect(buffer->memorydc, rect->left, rect->top, rect->right, rect->bottom); DeleteObject(SelectObject(buffer->memorydc, buffer->bitmap)); *retdc = buffer->memorydc; @@ -160,7 +162,7 @@ HRESULT WINAPI EndBufferedPaint(HPAINTBUFFER bufferhandle, BOOL update) { if (!BitBlt(buffer->targetdc, buffer->rect.left, buffer->rect.top, buffer->rect.right - buffer->rect.left, buffer->rect.bottom - buffer->rect.top, - buffer->memorydc, 0, 0, SRCCOPY)) + buffer->memorydc, buffer->rect.left, buffer->rect.top, SRCCOPY)) { WARN("BitBlt() failed\n"); } diff --git a/dlls/uxtheme/tests/system.c b/dlls/uxtheme/tests/system.c index 2348a1d..1842be4 100644 --- a/dlls/uxtheme/tests/system.c +++ b/dlls/uxtheme/tests/system.c @@ -523,14 +523,42 @@ static void test_CloseThemeData(void) ok( hRes == E_HANDLE, "Expected E_HANDLE, got 0x%08x\n", hRes); } +static void test_buffer_dc_props(HDC hdc, const RECT *rect) +{ + static const XFORM ident = { 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f }; + XFORM xform; + POINT org; + RECT box; + BOOL ret; + + ret = GetWorldTransform(hdc, &xform); + ok(ret, "Failed to get world transform\n"); + ok(!memcmp(&xform, &ident, sizeof(xform)), "Unexpected world transform\n"); + + ret = GetViewportOrgEx(hdc, &org); + ok(ret, "Failed to get vport origin\n"); + ok(org.x == 0 && org.y == 0, "Unexpected vport origin\n"); + + ret = GetWindowOrgEx(hdc, &org); + ok(ret, "Failed to get vport origin\n"); + ok(org.x == rect->left && org.y == rect->top, "Unexpected window origin\n"); + + ret = GetClipBox(hdc, &box); + ok(ret, "Failed to get clip box\n"); + ok(box.left == rect->left && box.top == rect->top, "Unexpected clip box\n"); + + ok(GetGraphicsMode(hdc) == GM_COMPATIBLE, "wrong graphics mode\n"); +} + static void test_buffered_paint(void) { + HDC target, src, hdc, screen_dc; BP_PAINTPARAMS params = { 0 }; BP_BUFFERFORMAT format; - HDC target, src, hdc; HPAINTBUFFER buffer; RECT rect, rect2; RGBQUAD *bits; + HBITMAP hbm; HRESULT hr; int row; @@ -670,6 +698,31 @@ todo_wine hr = pGetBufferedPaintBits(NULL, NULL, &row); ok(hr == E_POINTER, "Unexpected return code %#x\n", hr); + screen_dc = GetDC(0); + + hdc = CreateCompatibleDC(screen_dc); + ok(hdc != NULL, "Failed to create a DC\n"); + hbm = CreateCompatibleBitmap(screen_dc, 64, 64); + ok(hbm != NULL, "Failed to create a bitmap\n"); + SelectObject(hdc, hbm); + + ReleaseDC(0, screen_dc); + + SetRect(&rect, 1, 2, 34, 56); + + buffer = pBeginBufferedPaint(hdc, &rect, BPBF_COMPATIBLEBITMAP, NULL, &src); + test_buffer_dc_props(src, &rect); + hr = pEndBufferedPaint(buffer, FALSE); + ok(hr == S_OK, "Unexpected return code %#x\n", hr); + + DeleteObject(hbm); + DeleteDC(hdc); + + buffer = pBeginBufferedPaint(target, &rect, BPBF_COMPATIBLEBITMAP, NULL, &src); + test_buffer_dc_props(src, &rect); + hr = pEndBufferedPaint(buffer, FALSE); + ok(hr == S_OK, "Unexpected return code %#x\n", hr); + /* access buffer bits */ for (format = BPBF_COMPATIBLEBITMAP; format <= BPBF_TOPDOWNMONODIB; format++) {
1
0
0
0
Ken Thomases : gdiplus: Avoid infinite recursion in flatten_bezier().
by Alexandre Julliard
25 Apr '17
25 Apr '17
Module: wine Branch: master Commit: a3f0a5913299d675426e039b5f1d794993144fbf URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a3f0a5913299d675426e039b5…
Author: Ken Thomases <ken(a)codeweavers.com> Date: Mon Apr 24 13:16:08 2017 -0500 gdiplus: Avoid infinite recursion in flatten_bezier(). If either of the recursive calls would have the same x2, y2, x3, and y3 arguments as the current call, the path is as flat as the precision of floats allows. Signed-off-by: Ken Thomases <ken(a)codeweavers.com> Signed-off-by: Vincent Povirk <vincent(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdiplus/graphicspath.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dlls/gdiplus/graphicspath.c b/dlls/gdiplus/graphicspath.c index 5a3356a..4d70796 100644 --- a/dlls/gdiplus/graphicspath.c +++ b/dlls/gdiplus/graphicspath.c @@ -142,6 +142,10 @@ static BOOL flatten_bezier(path_list_node_t *start, REAL x2, REAL y2, REAL x3, R mp[2].X = (mp[1].X + mp[3].X) / 2.0; mp[2].Y = (mp[1].Y + mp[3].Y) / 2.0; + if ((x2 == mp[0].X && y2 == mp[0].Y && x3 == mp[1].X && y3 == mp[1].Y) || + (x2 == mp[3].X && y2 == mp[3].Y && x3 == mp[4].X && y3 == mp[4].Y)) + return TRUE; + pt = end->pt; pt_st = start->pt; /* check flatness as a half of distance between middle point and a linearized path */
1
0
0
0
Henri Verbeet : wined3d: Make blits asynchronous by default.
by Alexandre Julliard
25 Apr '17
25 Apr '17
Module: wine Branch: master Commit: 5ff2fdc452c4b5560ab363e2c51f3ac6dba3c703 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5ff2fdc452c4b5560ab363e2c…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon Apr 24 23:31:31 2017 +0200 wined3d: Make blits asynchronous by default. Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ddraw/surface.c | 11 ++++++++--- dlls/wined3d/surface.c | 20 +++----------------- include/wine/wined3d.h | 4 ++-- 3 files changed, 13 insertions(+), 22 deletions(-) diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c index 90731f0..a780f1a 100644 --- a/dlls/ddraw/surface.c +++ b/dlls/ddraw/surface.c @@ -1408,6 +1408,7 @@ static HRESULT ddraw_surface_blt(struct ddraw_surface *dst_surface, const RECT * { struct wined3d_device *wined3d_device = dst_surface->ddraw->wined3d_device; struct wined3d_color colour; + DWORD wined3d_flags; if (flags & DDBLT_COLORFILL) { @@ -1431,14 +1432,18 @@ static HRESULT ddraw_surface_blt(struct ddraw_surface *dst_surface, const RECT * dst_rect, WINED3DCLEAR_ZBUFFER, NULL, colour.r, 0); } - if (flags & ~WINED3D_BLT_MASK) + wined3d_flags = flags & ~DDBLT_ASYNC; + if (wined3d_flags & ~WINED3D_BLT_MASK) { FIXME("Unhandled flags %#x.\n", flags); return E_NOTIMPL; } + if (!(flags & DDBLT_ASYNC)) + wined3d_flags |= WINED3D_BLT_SYNCHRONOUS; + return wined3d_texture_blt(dst_surface->wined3d_texture, dst_surface->sub_resource_idx, dst_rect, - src_surface->wined3d_texture, src_surface->sub_resource_idx, src_rect, flags, fx, filter); + src_surface->wined3d_texture, src_surface->sub_resource_idx, src_rect, wined3d_flags, fx, filter); } static HRESULT ddraw_surface_blt_clipped(struct ddraw_surface *dst_surface, const RECT *dst_rect_in, @@ -4231,10 +4236,10 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_BltFast(IDirectDrawSurfac { struct ddraw_surface *dst_impl = impl_from_IDirectDrawSurface7(iface); struct ddraw_surface *src_impl = unsafe_impl_from_IDirectDrawSurface7(src_surface); + DWORD flags = WINED3D_BLT_SYNCHRONOUS; DWORD src_w, src_h, dst_w, dst_h; HRESULT hr = DD_OK; RECT dst_rect, s; - DWORD flags = 0; TRACE("iface %p, dst_x %u, dst_y %u, src_surface %p, src_rect %s, flags %#x.\n", iface, dst_x, dst_y, src_surface, wine_dbgstr_rect(src_rect), trans); diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 9760f72..a02b6f2 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -3564,11 +3564,8 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst BOOL scale, convert; DWORD dst_location; - static const DWORD simple_blit = WINED3D_BLT_ASYNC - | WINED3D_BLT_SRC_CKEY + static const DWORD simple_blit = WINED3D_BLT_SRC_CKEY | WINED3D_BLT_SRC_CKEY_OVERRIDE - | WINED3D_BLT_WAIT - | WINED3D_BLT_DO_NOT_WAIT | WINED3D_BLT_ALPHA_TEST; TRACE("dst_surface %p, dst_rect %s, src_surface %p, src_rect %s, flags %#x, fx %p, filter %s.\n", @@ -3590,18 +3587,6 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst if (!fx || !(fx->fx)) flags &= ~WINED3D_BLT_FX; - if (flags & WINED3D_BLT_WAIT) - flags &= ~WINED3D_BLT_WAIT; - - if (flags & WINED3D_BLT_ASYNC) - { - static unsigned int once; - - if (!once++) - FIXME("Can't handle WINED3D_BLT_ASYNC flag.\n"); - flags &= ~WINED3D_BLT_ASYNC; - } - /* WINED3D_BLT_DO_NOT_WAIT appeared in DX7. */ if (flags & WINED3D_BLT_DO_NOT_WAIT) { @@ -3609,9 +3594,10 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst if (!once++) FIXME("Can't handle WINED3D_BLT_DO_NOT_WAIT flag.\n"); - flags &= ~WINED3D_BLT_DO_NOT_WAIT; } + flags &= ~(WINED3D_BLT_SYNCHRONOUS | WINED3D_BLT_DO_NOT_WAIT | WINED3D_BLT_WAIT); + if (!device->d3d_initialized) { WARN("D3D not initialized, using fallback.\n"); diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index 05368bd..e1d7702 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -1309,7 +1309,6 @@ enum wined3d_shader_byte_code_format /* add dwZBufferBaseDest to every source z value before compare */ #define WINEDDBLTFX_ZBUFFERBASEDEST 0x00000100 -#define WINED3D_BLT_ASYNC 0x00000200 #define WINED3D_BLT_FX 0x00000800 #define WINED3D_BLT_DST_CKEY 0x00002000 #define WINED3D_BLT_DST_CKEY_OVERRIDE 0x00004000 @@ -1317,8 +1316,9 @@ enum wined3d_shader_byte_code_format #define WINED3D_BLT_SRC_CKEY_OVERRIDE 0x00010000 #define WINED3D_BLT_WAIT 0x01000000 #define WINED3D_BLT_DO_NOT_WAIT 0x08000000 +#define WINED3D_BLT_SYNCHRONOUS 0x40000000 #define WINED3D_BLT_ALPHA_TEST 0x80000000 -#define WINED3D_BLT_MASK 0x0901ea00 +#define WINED3D_BLT_MASK 0x0901e800 /* dwFlags for GetBltStatus */ #define WINEDDGBS_CANBLT 0x00000001
1
0
0
0
Henri Verbeet : ddraw: Ignore unsupported blit flags.
by Alexandre Julliard
25 Apr '17
25 Apr '17
Module: wine Branch: master Commit: 6b41501344ecedf12692902f08aada283847e8cd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6b41501344ecedf12692902f0…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon Apr 24 23:31:30 2017 +0200 ddraw: Ignore unsupported blit flags. Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ddraw/surface.c | 24 +++++++++++++++++++++--- dlls/ddraw/tests/ddraw1.c | 4 ++-- dlls/ddraw/tests/ddraw2.c | 4 ++-- dlls/ddraw/tests/ddraw4.c | 4 ++-- dlls/ddraw/tests/ddraw7.c | 4 ++-- 5 files changed, 29 insertions(+), 11 deletions(-) diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c index 6c4ed11..90731f0 100644 --- a/dlls/ddraw/surface.c +++ b/dlls/ddraw/surface.c @@ -1570,6 +1570,7 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_Blt(IDirectDrawSurface7 * struct ddraw_surface *dst_impl = impl_from_IDirectDrawSurface7(iface); struct ddraw_surface *src_impl = unsafe_impl_from_IDirectDrawSurface7(src_surface); struct wined3d_blt_fx wined3d_fx; + DWORD unsupported_flags; DWORD fill_colour = 0; HRESULT hr = DD_OK; DDBLTFX rop_fx; @@ -1577,9 +1578,26 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_Blt(IDirectDrawSurface7 * TRACE("iface %p, dst_rect %s, src_surface %p, src_rect %s, flags %#x, fx %p.\n", iface, wine_dbgstr_rect(dst_rect), src_surface, wine_dbgstr_rect(src_rect), flags, fx); - /* Check for validity of the flags here. WineD3D Has the software-opengl selection path and would have - * to check at 2 places, and sometimes do double checks. This also saves the call to wined3d :-) - */ + unsupported_flags = DDBLT_ALPHADEST + | DDBLT_ALPHADESTCONSTOVERRIDE + | DDBLT_ALPHADESTNEG + | DDBLT_ALPHADESTSURFACEOVERRIDE + | DDBLT_ALPHAEDGEBLEND + | DDBLT_ALPHASRC + | DDBLT_ALPHASRCCONSTOVERRIDE + | DDBLT_ALPHASRCNEG + | DDBLT_ALPHASRCSURFACEOVERRIDE + | DDBLT_ZBUFFER + | DDBLT_ZBUFFERDESTCONSTOVERRIDE + | DDBLT_ZBUFFERDESTOVERRIDE + | DDBLT_ZBUFFERSRCCONSTOVERRIDE + | DDBLT_ZBUFFERSRCOVERRIDE; + if (flags & unsupported_flags) + { + WARN("Ignoring unsupported flags %#x.\n", flags & unsupported_flags); + flags &= ~unsupported_flags; + } + if ((flags & DDBLT_KEYSRCOVERRIDE) && (!fx || flags & DDBLT_KEYSRC)) { WARN("Invalid source color key parameters, returning DDERR_INVALIDPARAMS\n"); diff --git a/dlls/ddraw/tests/ddraw1.c b/dlls/ddraw/tests/ddraw1.c index 68f56ff..ac4942d 100644 --- a/dlls/ddraw/tests/ddraw1.c +++ b/dlls/ddraw/tests/ddraw1.c @@ -8959,10 +8959,10 @@ static void test_blt_z_alpha(void) ok(SUCCEEDED(hr), "Test %u: Got unexpected hr %#x.\n", i, hr); hr = IDirectDrawSurface_Blt(dst_surface, NULL, src_surface, NULL, blt_flags[i] | DDBLT_WAIT, &fx); - todo_wine ok(SUCCEEDED(hr), "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Got unexpected hr %#x.\n", i, hr); color = get_surface_color(dst_surface, 32, 32); - todo_wine ok(compare_color(color, 0x0000ff00, 0), "Test %u: Got unexpected color 0x%08x.\n", i, color); + ok(compare_color(color, 0x0000ff00, 0), "Test %u: Got unexpected color 0x%08x.\n", i, color); } IDirectDrawSurface_Release(dst_surface); diff --git a/dlls/ddraw/tests/ddraw2.c b/dlls/ddraw/tests/ddraw2.c index df734f1..67a2b06 100644 --- a/dlls/ddraw/tests/ddraw2.c +++ b/dlls/ddraw/tests/ddraw2.c @@ -10047,10 +10047,10 @@ static void test_blt_z_alpha(void) ok(SUCCEEDED(hr), "Test %u: Got unexpected hr %#x.\n", i, hr); hr = IDirectDrawSurface_Blt(dst_surface, NULL, src_surface, NULL, blt_flags[i] | DDBLT_WAIT, &fx); - todo_wine ok(SUCCEEDED(hr), "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Got unexpected hr %#x.\n", i, hr); color = get_surface_color(dst_surface, 32, 32); - todo_wine ok(compare_color(color, 0x0000ff00, 0), "Test %u: Got unexpected color 0x%08x.\n", i, color); + ok(compare_color(color, 0x0000ff00, 0), "Test %u: Got unexpected color 0x%08x.\n", i, color); } IDirectDrawSurface_Release(dst_surface); diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c index 8072bc9..948a1a5 100644 --- a/dlls/ddraw/tests/ddraw4.c +++ b/dlls/ddraw/tests/ddraw4.c @@ -11159,10 +11159,10 @@ static void test_blt_z_alpha(void) ok(SUCCEEDED(hr), "Test %u: Got unexpected hr %#x.\n", i, hr); hr = IDirectDrawSurface4_Blt(dst_surface, NULL, src_surface, NULL, blt_flags[i] | DDBLT_WAIT, &fx); - todo_wine ok(SUCCEEDED(hr), "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Got unexpected hr %#x.\n", i, hr); color = get_surface_color(dst_surface, 32, 32); - todo_wine ok(compare_color(color, 0x0000ff00, 0), "Test %u: Got unexpected color 0x%08x.\n", i, color); + ok(compare_color(color, 0x0000ff00, 0), "Test %u: Got unexpected color 0x%08x.\n", i, color); } IDirectDrawSurface4_Release(dst_surface); diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c index 601fcb3..79ce80f 100644 --- a/dlls/ddraw/tests/ddraw7.c +++ b/dlls/ddraw/tests/ddraw7.c @@ -11485,10 +11485,10 @@ static void test_blt_z_alpha(void) ok(SUCCEEDED(hr), "Test %u: Got unexpected hr %#x.\n", i, hr); hr = IDirectDrawSurface7_Blt(dst_surface, NULL, src_surface, NULL, blt_flags[i] | DDBLT_WAIT, &fx); - todo_wine ok(SUCCEEDED(hr), "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Got unexpected hr %#x.\n", i, hr); color = get_surface_color(dst_surface, 32, 32); - todo_wine ok(compare_color(color, 0x0000ff00, 0), "Test %u: Got unexpected color 0x%08x.\n", i, color); + ok(compare_color(color, 0x0000ff00, 0), "Test %u: Got unexpected color 0x%08x.\n", i, color); } IDirectDrawSurface7_Release(dst_surface);
1
0
0
0
Henri Verbeet : ddraw/tests: Add a test for the alpha and z-buffer blit flags.
by Alexandre Julliard
25 Apr '17
25 Apr '17
Module: wine Branch: master Commit: 45b01908da378f16a2612a012c52205daca0bbb1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=45b01908da378f16a2612a012…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon Apr 24 23:31:29 2017 +0200 ddraw/tests: Add a test for the alpha and z-buffer blit flags. Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ddraw/tests/ddraw1.c | 100 ++++++++++++++++++++++++++++++++++++++++++++++ dlls/ddraw/tests/ddraw2.c | 100 ++++++++++++++++++++++++++++++++++++++++++++++ dlls/ddraw/tests/ddraw4.c | 100 ++++++++++++++++++++++++++++++++++++++++++++++ dlls/ddraw/tests/ddraw7.c | 100 ++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 400 insertions(+) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=45b01908da378f16a2612…
1
0
0
0
Ken Thomases : winemac: Opt out of macOS 10.12' s automatic window tabbing feature.
by Alexandre Julliard
24 Apr '17
24 Apr '17
Module: wine Branch: master Commit: e49feb63f489141c08a967a9c47930559e1de4f7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e49feb63f489141c08a967a9c…
Author: Ken Thomases <ken(a)codeweavers.com> Date: Mon Apr 24 13:07:16 2017 -0500 winemac: Opt out of macOS 10.12's automatic window tabbing feature. It doesn't seem to work well. In full-screen mode, newly-added windows don't always properly resize to fill the screen, so they're not the same size as the windows they're nominally tabbed with. In non-full-screen mode, switching between tabs sometimes causes the windows to grow in height each time. Etc. Signed-off-by: Ken Thomases <ken(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winemac.drv/cocoa_app.m | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/dlls/winemac.drv/cocoa_app.m b/dlls/winemac.drv/cocoa_app.m index 0caca9e..4013e03 100644 --- a/dlls/winemac.drv/cocoa_app.m +++ b/dlls/winemac.drv/cocoa_app.m @@ -32,6 +32,15 @@ static NSString* const WineAppWaitQueryResponseMode = @"WineAppWaitQueryResponse int macdrv_err_on; +#if !defined(MAC_OS_X_VERSION_10_12) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_12 +@interface NSWindow (WineAutoTabbingExtensions) + + + (void) setAllowsAutomaticWindowTabbing:(BOOL)allows; + +@end +#endif + + /*********************************************************************** * WineLocalizedString * @@ -124,6 +133,9 @@ static NSString* WineLocalizedString(unsigned int stringID) [NSNumber numberWithBool:NO], @"ApplePressAndHoldEnabled", nil]; [[NSUserDefaults standardUserDefaults] registerDefaults:defaults]; + + if ([NSWindow respondsToSelector:@selector(setAllowsAutomaticWindowTabbing:)]) + [NSWindow setAllowsAutomaticWindowTabbing:NO]; } }
1
0
0
0
Ken Thomases : winemac: Don't let child (owned) windows be Cocoa primary full-screen windows.
by Alexandre Julliard
24 Apr '17
24 Apr '17
Module: wine Branch: master Commit: e0ef30e542a66071cb25af3a07afba3262b673bf URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e0ef30e542a66071cb25af3a0…
Author: Ken Thomases <ken(a)codeweavers.com> Date: Mon Apr 24 13:07:15 2017 -0500 winemac: Don't let child (owned) windows be Cocoa primary full-screen windows. They shouldn't get a separate space; they should stick with their parent (owner). Signed-off-by: Ken Thomases <ken(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winemac.drv/cocoa_window.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dlls/winemac.drv/cocoa_window.m b/dlls/winemac.drv/cocoa_window.m index 9ca40f9..1150322 100644 --- a/dlls/winemac.drv/cocoa_window.m +++ b/dlls/winemac.drv/cocoa_window.m @@ -978,7 +978,8 @@ static CVReturn WineDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTi NSUInteger style = [self styleMask]; if (behavior & NSWindowCollectionBehaviorParticipatesInCycle && - style & NSResizableWindowMask && !(style & NSUtilityWindowMask) && !maximized) + style & NSResizableWindowMask && !(style & NSUtilityWindowMask) && !maximized && + !(self.parentWindow || self.latentParentWindow)) { behavior |= NSWindowCollectionBehaviorFullScreenPrimary; behavior &= ~NSWindowCollectionBehaviorFullScreenAuxiliary; @@ -1839,6 +1840,7 @@ static CVReturn WineDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTi [latentParentWindow removeChildWineWindow:self]; if ([parent addChildWineWindow:self]) [[WineApplicationController sharedController] adjustWindowLevels]; + [self adjustFullScreenBehavior:[self collectionBehavior]]; } }
1
0
0
0
Ken Thomases : winemac: Use the -close method rather than -orderOut: for full-screen windows.
by Alexandre Julliard
24 Apr '17
24 Apr '17
Module: wine Branch: master Commit: ff3766c7594128f981daf441990302e54f4a26db URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ff3766c7594128f981daf4419…
Author: Ken Thomases <ken(a)codeweavers.com> Date: Mon Apr 24 13:07:14 2017 -0500 winemac: Use the -close method rather than -orderOut: for full-screen windows. Simply ordering them out leaves the user on the full-screen space, which is now an empty black screen. Closing the window closes the space, too. Signed-off-by: Ken Thomases <ken(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winemac.drv/cocoa_window.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/winemac.drv/cocoa_window.m b/dlls/winemac.drv/cocoa_window.m index 7fa432a..9ca40f9 100644 --- a/dlls/winemac.drv/cocoa_window.m +++ b/dlls/winemac.drv/cocoa_window.m @@ -1673,7 +1673,7 @@ static CVReturn WineDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTi [parent grabDockIconSnapshotFromWindow:self force:NO]; [self becameIneligibleParentOrChild]; - if ([self isMiniaturized]) + if ([self isMiniaturized] || [self styleMask] & NSFullScreenWindowMask) { fakingClose = TRUE; [self close];
1
0
0
0
← Newer
1
...
12
13
14
15
16
17
18
...
76
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
Results per page:
10
25
50
100
200