comparison mac/dw.m @ 930:b6ee515cad8a

When getting dw_window_show() called on an unresized window... trigger a relayout on Mac.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Mon, 25 Apr 2011 12:26:20 +0000
parents d7e88ac1647c
children dfd84cefd80b
comparison
equal deleted inserted replaced
929:d7e88ac1647c 930:b6ee515cad8a
693 _event_handler([self window], nil, 1); 693 _event_handler([self window], nil, 1);
694 oldsize.width = size.width; 694 oldsize.width = size.width;
695 oldsize.height = size.height; 695 oldsize.height = size.height;
696 _handle_resize_events(box); 696 _handle_resize_events(box);
697 } 697 }
698 }
699 -(void)showWindow
700 {
701 NSSize size = [self frame].size;
702
703 if(oldsize.width == size.width && oldsize.height == size.height)
704 {
705 _do_resize(box, size.width, size.height);
706 _handle_resize_events(box);
707 }
708
698 } 709 }
699 -(void)windowDidBecomeMain:(id)sender 710 -(void)windowDidBecomeMain:(id)sender
700 { 711 {
701 if(windowmenu) 712 if(windowmenu)
702 { 713 {
6738 if(rect.size.width < 5 || rect.size.height < 5) 6749 if(rect.size.width < 5 || rect.size.height < 5)
6739 { 6750 {
6740 /* Make a sane default size because MacOS won't automatically */ 6751 /* Make a sane default size because MacOS won't automatically */
6741 [window setContentSize:NSMakeSize(200,150)]; 6752 [window setContentSize:NSMakeSize(200,150)];
6742 } 6753 }
6754 [[window contentView] showWindow];
6743 [window makeKeyAndOrderFront:nil]; 6755 [window makeKeyAndOrderFront:nil];
6744 } 6756 }
6745 return 0; 6757 return 0;
6746 } 6758 }
6747 6759