summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bundles/org.eclipse.swt/.classpath_gtk1
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Program/gtk/org/eclipse/swt/program/Program.java17
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT Program/motif/org/eclipse/swt/program/Program.java12
3 files changed, 15 insertions, 15 deletions
diff --git a/bundles/org.eclipse.swt/.classpath_gtk b/bundles/org.eclipse.swt/.classpath_gtk
index bf76b3b332..00fb782baf 100644
--- a/bundles/org.eclipse.swt/.classpath_gtk
+++ b/bundles/org.eclipse.swt/.classpath_gtk
@@ -19,6 +19,7 @@
<classpathentry kind="src" path="Eclipse SWT Program/gtk"/>
<classpathentry kind="src" path="Eclipse SWT Program/common"/>
<classpathentry kind="src" path="Eclipse SWT Program/gnome"/>
+ <classpathentry kind="src" path="Eclipse SWT Program/kde"/>
<classpathentry kind="src" path="Eclipse SWT Custom Widgets/common"/>
<classpathentry kind="src" path="Eclipse SWT Browser/common"/>
<classpathentry kind="src" path="Eclipse SWT Browser/mozilla"/>
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Program/gtk/org/eclipse/swt/program/Program.java b/bundles/org.eclipse.swt/Eclipse SWT Program/gtk/org/eclipse/swt/program/Program.java
index 855aa3acdd..c4c6b7d203 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Program/gtk/org/eclipse/swt/program/Program.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Program/gtk/org/eclipse/swt/program/Program.java
@@ -63,11 +63,11 @@ static int getDesktop(Display display) {
int desktop = DESKTOP_UNKNOWN;
/* Get the list of properties on the root window. */
- int xDisplay = display.xDisplay;
- int rootWindow = OS.XDefaultRootWindow(xDisplay);
+ int /*long*/ xDisplay = OS.GDK_DISPLAY();
+ int /*long*/ rootWindow = OS.XDefaultRootWindow(xDisplay);
int[] numProp = new int[1];
- int propList = OS.XListProperties(xDisplay, rootWindow, numProp);
- int[] property = new int[numProp[0]];
+ int /*long*/ propList = OS.XListProperties(xDisplay, rootWindow, numProp);
+ int /*long*/ [] property = new int/*long*/ [numProp[0]];
if (propList != 0) {
OS.memmove(property, propList, (property.length * 4));
OS.XFree(propList);
@@ -76,7 +76,7 @@ static int getDesktop(Display display) {
/* KDE is detected by checking if the the KWIN_RUNNING exists */
if (desktop == DESKTOP_UNKNOWN) {
byte[] kdeName = Converter.wcsToMbcs(null, "KWIN_RUNNING", true);
- int kde = OS.XInternAtom(xDisplay, kdeName, true);
+ int /*long*/ kde = OS.XInternAtom(xDisplay, kdeName, true);
for (int index = 0; desktop == DESKTOP_UNKNOWN && index < property.length; index++) {
if (property[index] == OS.None) continue;
if (property[index] == kde && kde_init()) desktop = DESKTOP_KDE;
@@ -96,13 +96,12 @@ static int getDesktop(Display display) {
*/
if (desktop == DESKTOP_UNKNOWN) {
byte[] gnomeName = Converter.wcsToMbcs(null, "_NET_SUPPORTING_WM_CHECK", true);
- int gnome = OS.XInternAtom(xDisplay, gnomeName, true);
+ int /*long*/ gnome = OS.XInternAtom(xDisplay, gnomeName, true);
if (gnome != OS.None && gnome_init()) {
desktop = DESKTOP_GNOME;
}
}
- System.out.println("desktop=" + desktop);
display.setData(DESKTOP_DATA, new Integer(desktop));
return desktop;
}
@@ -419,14 +418,14 @@ static Program kde_getProgram(Display display, String mimeType) {
program.display = display;
program.name = mimeType;
program.command = "KRun::runURL(url,mimeType)";
- //TODO - LEAK??
int /*long*/ kMimeType = KDE.KMimeType_mimeType(mimeTypeName);
if (kMimeType != 0) {
- //TODO - LEAK??
int /*long*/ mimeIcon = KDE.KMimeType_icon(kMimeType, 0, false);
int /*long*/ loader = KDE.KGlobal_iconLoader();
int /*long*/ path = KDE.KIconLoader_iconPath(loader, mimeIcon, KDE.KICON_SMALL, true);
program.iconPath = kde_convertQStringAndFree(path);
+ KDE.QString_delete(mimeIcon);
+ KDE.KMimeType_delete(kMimeType);
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Program/motif/org/eclipse/swt/program/Program.java b/bundles/org.eclipse.swt/Eclipse SWT Program/motif/org/eclipse/swt/program/Program.java
index 858a722105..32531467d8 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT Program/motif/org/eclipse/swt/program/Program.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Program/motif/org/eclipse/swt/program/Program.java
@@ -64,11 +64,11 @@ static int getDesktop(Display display) {
int desktop = DESKTOP_UNKNOWN;
/* Get the list of properties on the root window. */
- int xDisplay = display.xDisplay;
- int rootWindow = OS.XDefaultRootWindow(xDisplay);
+ int /*long*/ xDisplay = display.xDisplay;
+ int /*long*/ rootWindow = OS.XDefaultRootWindow(xDisplay);
int[] numProp = new int[1];
- int propList = OS.XListProperties(xDisplay, rootWindow, numProp);
- int[] property = new int[numProp[0]];
+ int /*long*/ propList = OS.XListProperties(xDisplay, rootWindow, numProp);
+ int /*long*/ [] property = new int/*long*/ [numProp[0]];
if (propList != 0) {
OS.memmove(property, propList, (property.length * 4));
OS.XFree(propList);
@@ -77,7 +77,7 @@ static int getDesktop(Display display) {
/* KDE is detected by checking if the the KWIN_RUNNING exists */
if (desktop == DESKTOP_UNKNOWN) {
byte[] kdeName = Converter.wcsToMbcs(null, "KWIN_RUNNING", true);
- int kde = OS.XInternAtom(xDisplay, kdeName, true);
+ int /*long*/ kde = OS.XInternAtom(xDisplay, kdeName, true);
for (int index = 0; desktop == DESKTOP_UNKNOWN && index < property.length; index++) {
if (property[index] == OS.None) continue;
if (property[index] == kde && kde_init()) desktop = DESKTOP_KDE;
@@ -97,7 +97,7 @@ static int getDesktop(Display display) {
*/
if (desktop == DESKTOP_UNKNOWN) {
byte[] gnomeName = Converter.wcsToMbcs(null, "_NET_SUPPORTING_WM_CHECK", true);
- int gnome = OS.XInternAtom(xDisplay, gnomeName, true);
+ int /*long*/ gnome = OS.XInternAtom(xDisplay, gnomeName, true);
if (gnome != OS.None && gnome_init()) {
desktop = DESKTOP_GNOME;
}