Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 57800 Details for
Bug 77174
Reparenting support on MacOS X
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Second iteration of a proposed patch
patch1.txt (text/plain), 3.54 KB, created by
Fred Wulff
on 2007-01-30 10:43:03 EST
(
hide
)
Description:
Second iteration of a proposed patch
Filename:
MIME Type:
Creator:
Fred Wulff
Created:
2007-01-30 10:43:03 EST
Size:
3.54 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.swt >Index: Eclipse SWT/carbon/org/eclipse/swt/widgets/Control.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Control.java,v >retrieving revision 1.241 >diff -u -r1.241 Control.java >--- Eclipse SWT/carbon/org/eclipse/swt/widgets/Control.java 29 Jan 2007 21:25:52 -0000 1.241 >+++ Eclipse SWT/carbon/org/eclipse/swt/widgets/Control.java 30 Jan 2007 15:34:00 -0000 >@@ -729,6 +729,10 @@ > return (state & PARENT_BACKGROUND) != 0 ? parent.findBackgroundControl () : null; > } > >+void fixChildren (Shell newShell, Shell oldShell) { >+ oldShell.fixShell (newShell, this); >+} >+ > void fixFocus (Control focusControl) { > Shell shell = getShell (); > Control control = this; >@@ -1544,7 +1548,7 @@ > */ > public boolean isReparentable () { > checkWidget(); >- return false; >+ return true; > } > > boolean isShowing () { >@@ -3010,8 +3014,28 @@ > */ > public boolean setParent (Composite parent) { > checkWidget(); >+ >+ if (parent == null) SWT.error(SWT.ERROR_INVALID_ARGUMENT); > if (parent.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT); >- return false; >+ if (this.parent == parent) return true; >+ if (!isReparentable ()) return false; >+ >+ releaseParent (); >+ >+ Shell newShell = parent.getShell (), oldShell = this.parent.getShell (); >+ >+ if (oldShell != newShell) >+ fixChildren (newShell, oldShell); >+ >+ int topHandle = topHandle (); >+ >+ if (OS.EmbedControl(topHandle, parent.topHandle ()) < 0) return false; >+ >+ this.parent = parent; >+ >+ setVisible (topHandle, true); >+ >+ return true; > } > > /** >Index: Eclipse SWT/carbon/org/eclipse/swt/widgets/Composite.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Composite.java,v >retrieving revision 1.83 >diff -u -r1.83 Composite.java >--- Eclipse SWT/carbon/org/eclipse/swt/widgets/Composite.java 29 Jan 2007 19:01:28 -0000 1.83 >+++ Eclipse SWT/carbon/org/eclipse/swt/widgets/Composite.java 30 Jan 2007 15:33:57 -0000 >@@ -298,6 +298,14 @@ > return layoutCount > 0 ? this : parent.findDeferredControl (); > } > >+void fixChildren (Shell newShell, Shell oldShell) { >+ super.fixChildren (newShell, oldShell); >+ Control [] children = _getChildren (); >+ for (int i=0; i<children.length; i++) { >+ children [i].fixChildren (newShell, oldShell); >+ } >+} >+ > void fixTabList (Control control) { > if (tabList == null) return; > int count = 0; >Index: Eclipse SWT/carbon/org/eclipse/swt/widgets/Shell.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Shell.java,v >retrieving revision 1.130 >diff -u -r1.130 Shell.java >--- Eclipse SWT/carbon/org/eclipse/swt/widgets/Shell.java 29 Jan 2007 19:01:30 -0000 1.130 >+++ Eclipse SWT/carbon/org/eclipse/swt/widgets/Shell.java 30 Jan 2007 15:34:01 -0000 >@@ -10,7 +10,6 @@ > *******************************************************************************/ > package org.eclipse.swt.widgets; > >- > import org.eclipse.swt.internal.carbon.OS; > import org.eclipse.swt.internal.carbon.Rect; > import org.eclipse.swt.internal.carbon.CGPoint; >@@ -626,6 +625,13 @@ > return layoutCount > 0 ? this : null; > } > >+void fixShell (Shell newShell, Control control) { >+ if (this == newShell) return; >+ if (control == lastActive) setActiveControl (null); >+ if (control == savedFocus) setSavedFocus(null); >+ if (control == defaultButton) setDefaultButton(null); >+} >+ > Cursor findCursor () { > return cursor; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 77174
:
21955
|
57800
|
57888