Module: wine
Branch: master
Commit: d9ed0fb8e5028cb264c10f1e15c8bf2f3658ca41
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d9ed0fb8e5028cb264c10f1e1…
Author: Ken Thomases <ken(a)codeweavers.com>
Date: Mon Oct 27 22:54:29 2014 -0500
winemac: Don't allow double-clicks in the content area to zoom the window.
On Yosemite, double-clicking a window's title bar zooms it. (This is to
compensate for the fact that the zoom button has been replaced by a full-screen
button.) Sometimes, double-clicking in the content area would count as double-
clicking in the title bar.
This is controlled, in part, by the -mouseDownCanMoveWindow method of the view
that was hit in the window. The default implementation of that returns YES
for non-opaque views, as the views are in the Mac driver. Overriding it to
return NO prevents the problem.
---
dlls/winemac.drv/cocoa_window.m | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/dlls/winemac.drv/cocoa_window.m b/dlls/winemac.drv/cocoa_window.m
index 35222c1..b2238cb 100644
--- a/dlls/winemac.drv/cocoa_window.m
+++ b/dlls/winemac.drv/cocoa_window.m
@@ -374,6 +374,11 @@ static inline NSUInteger adjusted_modifiers_for_option_behavior(NSUInteger modif
return [[self window] contentView] == self;
}
+ - (BOOL) mouseDownCanMoveWindow
+ {
+ return NO;
+ }
+
- (void) completeText:(NSString*)text
{
macdrv_event* event;
Module: wine
Branch: master
Commit: 9b810cd6e884facde7152a79a6474c3637b260ee
URL: http://source.winehq.org/git/wine.git/?a=commit;h=9b810cd6e884facde7152a79a…
Author: André Hentschel <nerv(a)dawncrow.de>
Date: Tue Oct 28 00:02:09 2014 +0100
wrc: Remove duplicate code (PVS-Studio).
---
tools/wrc/genres.c | 178 ++++++++++++++++++-----------------------------------
1 file changed, 61 insertions(+), 117 deletions(-)
diff --git a/tools/wrc/genres.c b/tools/wrc/genres.c
index 9cea432..8993a87 100644
--- a/tools/wrc/genres.c
+++ b/tools/wrc/genres.c
@@ -960,86 +960,48 @@ static res_t *cursorgroup2res(name_id_t *name, cursor_group_t *curg)
res = new_res();
restag = put_res_header(res, WRC_RT_GROUP_CURSOR, NULL, name, curg->memopt, &(curg->lvc));
- if(win32)
- {
- put_word(res, 0); /* Reserved */
- /* FIXME: The ResType in the NEWHEADER structure should
- * contain 14 according to the MS win32 doc. This is
- * not the case with the BRC compiler and I really doubt
- * the latter. Putting one here is compliant to win16 spec,
- * but who knows the true value?
- */
- put_word(res, 2); /* ResType */
- put_word(res, curg->ncursor);
-#if 0
- for(cur = curg->cursorlist; cur; cur = cur->next)
-#else
- cur = curg->cursorlist;
- while(cur->next)
- cur = cur->next;
- for(; cur; cur = cur->prev)
-#endif
- {
- put_word(res, cur->width);
- /* FIXME: The height of a cursor is half the size of
- * the bitmap's height. BRC puts the height from the
- * BITMAPINFOHEADER here instead of the cursorfile's
- * height. MS doesn't seem to care...
- */
- put_word(res, cur->height);
- /* FIXME: The next two are reversed in BRC and I don't
- * know why. Probably a bug. But, we can safely ignore
- * it because win16 does not support color cursors.
- * A warning should have been generated by the parser.
- */
- put_word(res, cur->planes);
- put_word(res, cur->bits);
- /* FIXME: The +4 is the hotspot in the cursor resource.
- * However, I could not find this in the documentation.
- * The hotspot bytes must either be included or MS
- * doesn't care.
- */
- put_dword(res, cur->data->size +4);
- put_word(res, cur->id);
- }
- }
- else /* win16 */
- {
- put_word(res, 0); /* Reserved */
- put_word(res, 2); /* ResType */
- put_word(res, curg->ncursor);
+
+ put_word(res, 0); /* Reserved */
+ /* FIXME: The ResType in the NEWHEADER structure should
+ * contain 14 according to the MS win32 doc. This is
+ * not the case with the BRC compiler and I really doubt
+ * the latter. Putting one here is compliant to win16 spec,
+ * but who knows the true value?
+ */
+ put_word(res, 2); /* ResType */
+ put_word(res, curg->ncursor);
#if 0
- for(cur = curg->cursorlist; cur; cur = cur->next)
+ for(cur = curg->cursorlist; cur; cur = cur->next)
#else
- cur = curg->cursorlist;
- while(cur->next)
- cur = cur->next;
- for(; cur; cur = cur->prev)
+ cur = curg->cursorlist;
+ while(cur->next)
+ cur = cur->next;
+ for(; cur; cur = cur->prev)
#endif
- {
- put_word(res, cur->width);
- /* FIXME: The height of a cursor is half the size of
- * the bitmap's height. BRC puts the height from the
- * BITMAPINFOHEADER here instead of the cursorfile's
- * height. MS doesn't seem to care...
- */
- put_word(res, cur->height);
- /* FIXME: The next two are reversed in BRC and I don't
- * know why. Probably a bug. But, we can safely ignore
- * it because win16 does not support color cursors.
- * A warning should have been generated by the parser.
- */
- put_word(res, cur->planes);
- put_word(res, cur->bits);
- /* FIXME: The +4 is the hotspot in the cursor resource.
- * However, I could not find this in the documentation.
- * The hotspot bytes must either be included or MS
- * doesn't care.
- */
- put_dword(res, cur->data->size +4);
- put_word(res, cur->id);
- }
- }
+ {
+ put_word(res, cur->width);
+ /* FIXME: The height of a cursor is half the size of
+ * the bitmap's height. BRC puts the height from the
+ * BITMAPINFOHEADER here instead of the cursorfile's
+ * height. MS doesn't seem to care...
+ */
+ put_word(res, cur->height);
+ /* FIXME: The next two are reversed in BRC and I don't
+ * know why. Probably a bug. But, we can safely ignore
+ * it because win16 does not support color cursors.
+ * A warning should have been generated by the parser.
+ */
+ put_word(res, cur->planes);
+ put_word(res, cur->bits);
+ /* FIXME: The +4 is the hotspot in the cursor resource.
+ * However, I could not find this in the documentation.
+ * The hotspot bytes must either be included or MS
+ * doesn't care.
+ */
+ put_dword(res, cur->data->size +4);
+ put_word(res, cur->id);
+ }
+
SetResSize(res, restag); /* Set ResourceSize */
if(win32)
put_pad(res);
@@ -1103,46 +1065,28 @@ static res_t *icongroup2res(name_id_t *name, icon_group_t *icog)
res = new_res();
restag = put_res_header(res, WRC_RT_GROUP_ICON, NULL, name, icog->memopt, &(icog->lvc));
- if(win32)
- {
- put_word(res, 0); /* Reserved */
- /* FIXME: The ResType in the NEWHEADER structure should
- * contain 14 according to the MS win32 doc. This is
- * not the case with the BRC compiler and I really doubt
- * the latter. Putting one here is compliant to win16 spec,
- * but who knows the true value?
- */
- put_word(res, 1); /* ResType */
- put_word(res, icog->nicon);
- for(ico = icog->iconlist; ico; ico = ico->next)
- {
- put_byte(res, ico->width);
- put_byte(res, ico->height);
- put_byte(res, ico->nclr);
- put_byte(res, 0); /* Reserved */
- put_word(res, ico->planes);
- put_word(res, ico->bits);
- put_dword(res, ico->data->size);
- put_word(res, ico->id);
- }
- }
- else /* win16 */
- {
- put_word(res, 0); /* Reserved */
- put_word(res, 1); /* ResType */
- put_word(res, icog->nicon);
- for(ico = icog->iconlist; ico; ico = ico->next)
- {
- put_byte(res, ico->width);
- put_byte(res, ico->height);
- put_byte(res, ico->nclr);
- put_byte(res, 0); /* Reserved */
- put_word(res, ico->planes);
- put_word(res, ico->bits);
- put_dword(res, ico->data->size);
- put_word(res, ico->id);
- }
- }
+
+ put_word(res, 0); /* Reserved */
+ /* FIXME: The ResType in the NEWHEADER structure should
+ * contain 14 according to the MS win32 doc. This is
+ * not the case with the BRC compiler and I really doubt
+ * the latter. Putting one here is compliant to win16 spec,
+ * but who knows the true value?
+ */
+ put_word(res, 1); /* ResType */
+ put_word(res, icog->nicon);
+ for(ico = icog->iconlist; ico; ico = ico->next)
+ {
+ put_byte(res, ico->width);
+ put_byte(res, ico->height);
+ put_byte(res, ico->nclr);
+ put_byte(res, 0); /* Reserved */
+ put_word(res, ico->planes);
+ put_word(res, ico->bits);
+ put_dword(res, ico->data->size);
+ put_word(res, ico->id);
+ }
+
SetResSize(res, restag); /* Set ResourceSize */
if(win32)
put_pad(res);