Skip to content

Commit 2e6c5fe

Browse files
Merge develop into refactor-syntax_unicode
Merging in the update for the platform player
1 parent 641d541 commit 2e6c5fe

73 files changed

Lines changed: 11803 additions & 7283 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/notes/bugfix-12705.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Fix sending of mouseRelease messages with new platform layer

docs/notes/bugfix-12715.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Incomplete stack drawing when opening stack with acceleratedRendering on retina display

engine/engine.xcodeproj/project.pbxproj

Lines changed: 55 additions & 32 deletions
Large diffs are not rendered by default.

engine/src/button.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1259,10 +1259,10 @@ Boolean MCButton::mdown(uint2 which)
12591259
return True;
12601260
}
12611261

1262-
Boolean MCButton::mup(uint2 which)
1262+
Boolean MCButton::mup(uint2 which, bool p_release)
12631263
{
12641264
if (state & CS_MENU_ATTACHED)
1265-
return MCObject::mup(which);
1265+
return MCObject::mup(which, p_release);
12661266
MCAutoStringRef t_pick;
12671267
if (state & CS_SUBMENU
12681268
&& (which == 0 || menubutton == 0 || (uint1)which == menubutton))
@@ -1283,14 +1283,14 @@ Boolean MCButton::mup(uint2 which)
12831283
{
12841284
state &= ~CS_FIELD_GRAB;
12851285
if (state & CS_SUBMENU)
1286-
menu->mup(which);
1286+
menu->mup(which, p_release);
12871287
else
1288-
entry->mup(which);
1288+
entry->mup(which, p_release);
12891289
return True;
12901290
}
12911291
if (menudepth > mymenudepth)
12921292
{
1293-
menu->mup(which);
1293+
menu->mup(which, p_release);
12941294
if (menudepth > mymenudepth)
12951295
return True;
12961296
}
@@ -1415,7 +1415,7 @@ Boolean MCButton::mup(uint2 which)
14151415
if (state & CS_FIELD_GRAB)
14161416
{
14171417
state &= ~CS_FIELD_GRAB;
1418-
entry->mup(which);
1418+
entry->mup(which, p_release);
14191419
}
14201420
else
14211421
{
@@ -1486,7 +1486,7 @@ Boolean MCButton::mup(uint2 which)
14861486
if (state & CS_HILITED)
14871487
radio();
14881488
}
1489-
if (MCU_point_in_rect(rect, mx, my))
1489+
if (!p_release && MCU_point_in_rect(rect, mx, my))
14901490
{
14911491
state |= CS_VISITED;
14921492
message_with_valueref_args(MCM_mouse_up, MCSTR("1"));
@@ -1497,7 +1497,7 @@ Boolean MCButton::mup(uint2 which)
14971497
break;
14981498
case T_BUTTON:
14991499
case T_POINTER:
1500-
end();
1500+
end(true, p_release);
15011501
break;
15021502
case T_HELP:
15031503
help();
@@ -1509,7 +1509,7 @@ Boolean MCButton::mup(uint2 which)
15091509
}
15101510
else
15111511
{
1512-
if (MCU_point_in_rect(rect, mx, my))
1512+
if (!p_release && MCU_point_in_rect(rect, mx, my))
15131513
{
15141514
state |= CS_VISITED;
15151515
message_with_args(MCM_mouse_up, which);

engine/src/button.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ class MCButton : public MCControl
166166
virtual Boolean mfocus(int2 x, int2 y);
167167
virtual void munfocus();
168168
virtual Boolean mdown(uint2 which);
169-
virtual Boolean mup(uint2 which);
169+
virtual Boolean mup(uint2 which, bool p_release);
170170
virtual Boolean doubledown(uint2 which);
171171
virtual Boolean doubleup(uint2 which);
172172
#ifdef _MACOSX

engine/src/card.cpp

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -690,8 +690,8 @@ Boolean MCCard::mdown(uint2 which)
690690
{
691691
Boolean oldstate = MClockmessages;
692692
MClockmessages = True;
693-
if (!mup(which))
694-
oldfocused->mup(which);
693+
if (!mup(which, false))
694+
oldfocused->mup(which, false);
695695
MClockmessages = oldstate;
696696
}
697697
return True;
@@ -723,7 +723,7 @@ Boolean MCCard::mdown(uint2 which)
723723
{
724724
Boolean oldstate = MClockmessages;
725725
MClockmessages = True;
726-
mup(which);
726+
mup(which, false);
727727
MClockmessages = oldstate;
728728
}
729729
break;
@@ -819,14 +819,14 @@ Boolean MCCard::mdown(uint2 which)
819819
return True;
820820
}
821821

822-
Boolean MCCard::mup(uint2 which)
822+
Boolean MCCard::mup(uint2 which, bool p_release)
823823
{
824824
if (state & CS_MENU_ATTACHED)
825-
return MCObject::mup(which);
825+
return MCObject::mup(which, p_release);
826826
if (mfocused != NULL)
827827
{
828828
mgrabbed = False;
829-
return mfocused->getref()->mup(which);
829+
return mfocused->getref()->mup(which, p_release);
830830
}
831831
else
832832
{
@@ -853,7 +853,10 @@ Boolean MCCard::mup(uint2 which)
853853
case T_POINTER:
854854
case T_BROWSE:
855855
// MW-2010-10-15: [[ Bug 9055 ]] Mouse message consistency improvement
856-
message_with_valueref_args(MCM_mouse_up, MCSTR("1"));
856+
if (p_release)
857+
message_with_valueref_args(MCM_mouse_release, MCSTR("1"));
858+
else
859+
message_with_valueref_args(MCM_mouse_up, MCSTR("1"));
857860
break;
858861
case T_HELP:
859862
help();
@@ -864,7 +867,10 @@ Boolean MCCard::mup(uint2 which)
864867
break;
865868
case Button2:
866869
case Button3:
867-
message_with_args(MCM_mouse_up, which);
870+
if (p_release)
871+
message_with_valueref_args(MCM_mouse_release, MCSTR("1"));
872+
else
873+
message_with_valueref_args(MCM_mouse_up, MCSTR("1"));
868874
break;
869875
}
870876
mgrabbed = False;

engine/src/card.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class MCCard : public MCObject
7272
virtual void munfocus();
7373
virtual void mdrag(void);
7474
virtual Boolean mdown(uint2 which);
75-
virtual Boolean mup(uint2 which);
75+
virtual Boolean mup(uint2 which, bool p_release);
7676
virtual Boolean doubledown(uint2 which);
7777
virtual Boolean doubleup(uint2 which);
7878
virtual void timer(MCNameRef mptr, MCParameter *params);

engine/src/cmdsc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -994,7 +994,7 @@ MCControl *MCCreate::getobject(MCObject *&parent)
994994
case CT_SCROLLBAR:
995995
return MCtemplatescrollbar;
996996
case CT_PLAYER:
997-
return MCtemplateplayer;
997+
return (MCControl*)MCtemplateplayer;
998998
case CT_IMAGE:
999999
return MCtemplateimage;
10001000
case CT_GRAPHIC:

engine/src/cmdse.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ void MCDrag::exec_ctxt(MCExecContext& ctxt)
580580
MCmousex = ex;
581581
MCmousey = ey;
582582
MCdefaultstackptr->mfocus(ex, ey);
583-
MCdefaultstackptr->mup(which);
583+
MCdefaultstackptr->mup(which, false);
584584
MCscreen->setlockmods(False);
585585
MCmodifierstate = oldmstate;
586586
MCbuttonstate = oldbstate;
@@ -628,7 +628,7 @@ void MCDrag::exec_ctxt(MCExecContext& ctxt)
628628
if (x != oldx || y != oldy)
629629
MCdefaultstackptr->mfocus(x, y);
630630
}
631-
MCdefaultstackptr->mup(which);
631+
MCdefaultstackptr->mup(which, false);
632632
MCmodifierstate = oldmstate;
633633
MCbuttonstate = oldbstate;
634634
MCmousex = oldx;

engine/src/cmdss.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2618,7 +2618,7 @@ void MCSubwindow::exec_ctxt(MCExecContext &ctxt)
26182618
if (bptr->findmenu())
26192619
{
26202620
if (MCbuttonstate)
2621-
MCtargetptr -> mup(0);
2621+
MCtargetptr -> mup(0, false);
26222622
bptr->openmenu(True);
26232623
}
26242624
return ES_NORMAL;

0 commit comments

Comments
 (0)