mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-26 14:43:50 -04:00
Merge branch 'release/1.10.x'
This commit is contained in:
commit
f5401b19fa
@ -185,7 +185,7 @@ is_open() const {
|
|||||||
*/
|
*/
|
||||||
bool PipeStreamBuf::
|
bool PipeStreamBuf::
|
||||||
eof_pipe() const {
|
eof_pipe() const {
|
||||||
return (_pipe == nullptr) && feof(_pipe);
|
return (_pipe == nullptr) || feof(_pipe);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -728,13 +728,12 @@ set_properties_now(WindowProperties &properties) {
|
|||||||
// here.
|
// here.
|
||||||
if (!properties.has_undecorated() && !_properties.get_undecorated() &&
|
if (!properties.has_undecorated() && !_properties.get_undecorated() &&
|
||||||
[_window respondsToSelector:@selector(setStyleMask:)]) {
|
[_window respondsToSelector:@selector(setStyleMask:)]) {
|
||||||
if (properties.get_fixed_size()) {
|
NSUInteger style = ([_window styleMask] & NSFullScreenWindowMask);
|
||||||
[_window setStyleMask:NSTitledWindowMask | NSClosableWindowMask |
|
style |= NSTitledWindowMask | NSClosableWindowMask | NSMiniaturizableWindowMask;
|
||||||
NSMiniaturizableWindowMask ];
|
if (!properties.get_fixed_size()) {
|
||||||
} else {
|
style |= NSResizableWindowMask;
|
||||||
[_window setStyleMask:NSTitledWindowMask | NSClosableWindowMask |
|
|
||||||
NSMiniaturizableWindowMask | NSResizableWindowMask ];
|
|
||||||
}
|
}
|
||||||
|
[_window setStyleMask:style];
|
||||||
[_window makeFirstResponder:_view];
|
[_window makeFirstResponder:_view];
|
||||||
// Resize event fired by makeFirstResponder has an invalid backing scale factor
|
// Resize event fired by makeFirstResponder has an invalid backing scale factor
|
||||||
// The actual size must be reset afterward
|
// The actual size must be reset afterward
|
||||||
@ -749,16 +748,14 @@ set_properties_now(WindowProperties &properties) {
|
|||||||
_properties.set_undecorated(properties.get_undecorated());
|
_properties.set_undecorated(properties.get_undecorated());
|
||||||
|
|
||||||
if (!_properties.get_fullscreen()) {
|
if (!_properties.get_fullscreen()) {
|
||||||
if (properties.get_undecorated()) {
|
NSUInteger style = ([_window styleMask] & NSFullScreenWindowMask);
|
||||||
[_window setStyleMask: NSBorderlessWindowMask];
|
if (!properties.get_undecorated()) {
|
||||||
} else if (_properties.get_fixed_size()) {
|
style |= NSTitledWindowMask | NSClosableWindowMask | NSMiniaturizableWindowMask;
|
||||||
// Fixed size windows should not show the resize button.
|
if (!properties.get_fixed_size()) {
|
||||||
[_window setStyleMask: NSTitledWindowMask | NSClosableWindowMask |
|
style |= NSResizableWindowMask;
|
||||||
NSMiniaturizableWindowMask ];
|
}
|
||||||
} else {
|
|
||||||
[_window setStyleMask: NSTitledWindowMask | NSClosableWindowMask |
|
|
||||||
NSMiniaturizableWindowMask | NSResizableWindowMask ];
|
|
||||||
}
|
}
|
||||||
|
[_window setStyleMask:style];
|
||||||
[_window makeFirstResponder:_view];
|
[_window makeFirstResponder:_view];
|
||||||
// Resize event fired by makeFirstResponder has an invalid backing scale factor
|
// Resize event fired by makeFirstResponder has an invalid backing scale factor
|
||||||
// The actual size must be reset afterward
|
// The actual size must be reset afterward
|
||||||
@ -1176,10 +1173,16 @@ do_switch_fullscreen(CGDisplayModeRef mode) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (_window != nil) {
|
if (_window != nil) {
|
||||||
|
// Exit macOS' own fullscreen mode, since our own fullscreen mode
|
||||||
|
// doesn't work properly with it.
|
||||||
|
if ([_window styleMask] & NSFullScreenWindowMask) {
|
||||||
|
[_window toggleFullScreen:nil];
|
||||||
|
}
|
||||||
|
|
||||||
// For some reason, setting the style mask makes it give up its
|
// For some reason, setting the style mask makes it give up its
|
||||||
// first-responder status.
|
// first-responder status.
|
||||||
if ([_window respondsToSelector:@selector(setStyleMask:)]) {
|
if ([_window respondsToSelector:@selector(setStyleMask:)]) {
|
||||||
[_window setStyleMask:NSBorderlessWindowMask];
|
[_window setStyleMask:([_window styleMask] & NSFullScreenWindowMask)];
|
||||||
}
|
}
|
||||||
[_window makeFirstResponder:_view];
|
[_window makeFirstResponder:_view];
|
||||||
[_window setLevel:CGShieldingWindowLevel()];
|
[_window setLevel:CGShieldingWindowLevel()];
|
||||||
|
@ -16,11 +16,11 @@
|
|||||||
|
|
||||||
@implementation CocoaPandaApp
|
@implementation CocoaPandaApp
|
||||||
- (void) sendEvent: (NSEvent *) event {
|
- (void) sendEvent: (NSEvent *) event {
|
||||||
// This is a hack that allows us to receive cmd-key-up events correctly.
|
// This is a hack that allows us to receive cmd-key-up events correctly, as
|
||||||
// Also prevent it from eating the inserthelp key.
|
// well as key-up events during a full-screen transition.
|
||||||
if (([event type] == NSKeyUp && ([event modifierFlags] & NSCommandKeyMask))
|
// Also prevent it from eating the insert/help key.
|
||||||
||([event type] == NSKeyDown && [event keyCode] == 0x72)) {
|
if ([event type] == NSKeyUp ||
|
||||||
|
([event type] == NSKeyDown && [event keyCode] == 0x72)) {
|
||||||
[[self keyWindow] sendEvent: event];
|
[[self keyWindow] sendEvent: event];
|
||||||
} else {
|
} else {
|
||||||
[super sendEvent: event];
|
[super sendEvent: event];
|
||||||
|
@ -451,9 +451,11 @@ recompute_geom_node(const WorkingNodePath &np, LMatrix4 &rel_mat,
|
|||||||
int num_geoms = node->get_num_geoms();
|
int num_geoms = node->get_num_geoms();
|
||||||
for (int i = 0; i < num_geoms; i++) {
|
for (int i = 0; i < num_geoms; i++) {
|
||||||
PT(Geom) geom = node->modify_geom(i);
|
PT(Geom) geom = node->modify_geom(i);
|
||||||
distort_cat.debug()
|
if (distort_cat.is_debug()) {
|
||||||
<< " " << *node << " got geom " << geom
|
distort_cat.debug()
|
||||||
<< ", cache_ref = " << geom->get_cache_ref_count() << "\n";
|
<< " " << *node << " got geom " << geom
|
||||||
|
<< ", cache_ref = " << geom->get_cache_ref_count() << "\n";
|
||||||
|
}
|
||||||
geom->test_ref_count_integrity();
|
geom->test_ref_count_integrity();
|
||||||
recompute_geom(geom, rel_mat);
|
recompute_geom(geom, rel_mat);
|
||||||
}
|
}
|
||||||
|
@ -70,7 +70,7 @@ FLOATNAME(LOrientation)(const FLOATNAME(LMatrix4) &m) {
|
|||||||
*/
|
*/
|
||||||
INLINE_LINMATH FLOATNAME(LOrientation) FLOATNAME(LOrientation)::
|
INLINE_LINMATH FLOATNAME(LOrientation) FLOATNAME(LOrientation)::
|
||||||
operator * (const FLOATNAME(LRotation) &other) const {
|
operator * (const FLOATNAME(LRotation) &other) const {
|
||||||
return multiply((FLOATNAME(LOrientation) &)other);
|
return multiply((const FLOATNAME(LOrientation) &)other);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -80,5 +80,5 @@ operator * (const FLOATNAME(LRotation) &other) const {
|
|||||||
INLINE_LINMATH FLOATNAME(LOrientation) FLOATNAME(LOrientation)::
|
INLINE_LINMATH FLOATNAME(LOrientation) FLOATNAME(LOrientation)::
|
||||||
operator * (const FLOATNAME(LQuaternion) &other) const {
|
operator * (const FLOATNAME(LQuaternion) &other) const {
|
||||||
nassert_raise("LOrientation * LQuaternion is undefined; use LOrientation * LRotation or LQuaternion * LQuaternion");
|
nassert_raise("LOrientation * LQuaternion is undefined; use LOrientation * LRotation or LQuaternion * LQuaternion");
|
||||||
return multiply((FLOATNAME(LOrientation) &)other);
|
return multiply((const FLOATNAME(LOrientation) &)other);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user