Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 83e5129

Browse files
committed
Merge remote-tracking branch 'upstream/develop-8.1' into merge-develop_8.1_06.03.17
2 parents 6eec941 + 5fb1887 commit 83e5129

File tree

13 files changed

+110
-57
lines changed

13 files changed

+110
-57
lines changed

buildbot.mk

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ dist-tools: dist-tools-commercial
168168
distmac-disk: distmac-disk-indy distmac-disk-business
169169
endif
170170

171-
dist-tools: dist-tools-community
171+
dist-tools: dist-tools-community dist-tools-version-check
172172
distmac-disk: distmac-disk-community
173173

174174
dist-tools-community:
@@ -179,6 +179,19 @@ dist-tools-commercial:
179179
--built-docs-dir $(docs_build_dir)/cooked-commercial
180180
$(buildtool_command) --platform mac --platform win --platform linux --stage tools --edition business \
181181
--built-docs-dir $(docs_build_dir)/cooked-commercial
182+
# Ensure that the version for which we're trying to build installers
183+
# hasn't already been tagged.
184+
dist-tools-version-check:
185+
@if git rev-parse refs/tags/$(BUILD_SHORT_VERSION) \
186+
>/dev/null 2>&1 ; then \
187+
echo; \
188+
echo "$(BUILD_SHORT_VERSION) has already been released."; \
189+
echo "You probably need to update the 'version' file."; \
190+
echo; \
191+
exit 1; \
192+
fi
193+
194+
.PHONY: dist-tools-version-check
182195

183196
distmac-bundle-community:
184197
$(buildtool_command) --platform mac --stage bundle --edition community

docs/development/C++-style.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,3 +237,14 @@ See also [C++ Feature Usage Guidelines for LiveCode](C++-features.md).
237237
Bad:
238238

239239
double t_area = 2*acos(0.0)*t_radius*t_radius;
240+
241+
* When using preprocessor macros, ensure that the `#define`d identifier
242+
has a value.
243+
244+
Good:
245+
246+
#define FEATURE_PLATFORM_PLAYER (1)
247+
248+
Bad:
249+
250+
#define FEATURE_PLATFORM_PLAYER

docs/notes/bugfix-19229.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Fix crash when connecting an IR Receiver

docs/notes/bugfix-19287.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Make sure the clickLoc is updated on mouseDown/touchEnd on mobile

docs/notes/bugfix-19328.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Standalone startup stack needs to be mainstack before resolving parent scripts

docs/notes/bugfix-19390.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Reposition native layer controls correctly when resizing stacks

engine/src/dispatch.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,13 @@ IO_stat MCDispatch::readstartupstack(IO_handle stream, MCStack*& r_stack)
476476
{
477477
return IO_ERROR;
478478
}
479-
479+
480+
// We are reading the startup stack, so this becomes the root of the
481+
// stack list. This must happen prior to resolving parent scripts
482+
// because otherwise there are no mainstacks, which can cause a
483+
// crash when searching substacks.
484+
stacks = t_stack;
485+
480486
#ifndef _MOBILE
481487
// Make sure parent script references are up to date.
482488
if (s_loaded_parent_script_reference)
@@ -488,10 +494,6 @@ IO_stat MCDispatch::readstartupstack(IO_handle stream, MCStack*& r_stack)
488494
t_stack -> setextendedstate(True, ECS_USES_PARENTSCRIPTS);
489495
#endif
490496

491-
// We are reading the startup stack, so this becomes the root of the
492-
// stack list.
493-
stacks = t_stack;
494-
495497
r_stack = t_stack;
496498
return IO_NORMAL;
497499
}

engine/src/eventqueue.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,14 +358,15 @@ static void MCEventQueueDispatchEvent(MCEvent *p_event)
358358
s_click_count += 1;
359359
else
360360
s_click_count = 0;
361+
362+
MCclicklocx = MCmousex;
363+
MCclicklocy = MCmousey;
361364
}
362365
else
363366
s_click_time = t_event -> mouse . time;
364367

365368
MCeventtime = t_event -> mouse . time;
366369
MCmodifierstate = t_event -> mouse . press . modifiers;
367-
MCclicklocx = MCmousex;
368-
MCclicklocy = MCmousey;
369370
MCclickstackptr = MCmousestackptr;
370371

371372
MCObject *t_target;

engine/src/exec-files.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1746,8 +1746,8 @@ void MCFilesExecPerformReadTextUntil(MCExecContext& ctxt, IO_handle p_stream, in
17461746
doingspace = True;
17471747
}
17481748
}
1749-
else
1750-
{
1749+
else if (!MCStringIsEmpty(*t_norm_sent))
1750+
{
17511751
// Normalise the character read and append it to the normalised buffer
17521752
unichar_t *t_norm_chunk;
17531753
uint4 t_norm_chunk_size;

engine/src/native-layer-mac.mm

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,22 @@ @implementation com_runrev_livecode_MCContainerView
269269

270270
- (void)setFrameOrigin:(NSPoint)newOrigin
271271
{
272+
/* By default, NSViews don't adjust the positions or sizes of their
273+
* contents when their geometry changes. There is an autoresizing
274+
* behaviour that we could turn on, but we don't because it doesn't have
275+
* the properties that we require for a LiveCode group. It's therefore
276+
* necessary to manually nudge subviews around when the position of a
277+
* container view is adjusted. */
278+
NSPoint t_origin = [self frame].origin;
279+
NSPoint t_delta = {newOrigin.x - t_origin.x, newOrigin.y - t_origin.y};
280+
281+
for (NSView *t_subview in [self subviews])
282+
{
283+
NSPoint t_suborigin = [t_subview frame].origin;
284+
[t_subview setFrameOrigin: {t_suborigin.x + t_delta.x,
285+
t_suborigin.y + t_delta.y}];
286+
}
287+
272288
[super setFrameOrigin:newOrigin];
273289
[self setBoundsOrigin:newOrigin];
274290
}

0 commit comments

Comments
 (0)