reorganized file layout (part 2: edits)
[org.ibex.core.git] / src / org / ibex / plat / X11.cc
index 62672d7..0e91ece 100644 (file)
@@ -1,8 +1,6 @@
 // Copyright 2002 Adam Megacz, see the COPYING file for licensing [LGPL]
 // see below for copyright information on the second portion of this file
 
-#include "POSIX.cc"
-
 #include <X11/Xlib.h>
 #include <X11/extensions/XShm.h>
 #include <X11/keysymdef.h>
@@ -29,6 +27,8 @@
 #include <java/lang/System.h>
 #include <java/io/PrintStream.h>
 
+#include "POSIX.cc"
+
 // static (per-xserver) data
 static Visual* visual;
 static Colormap s_colormap;
@@ -397,7 +397,7 @@ void org::ibex::plat::X11$X11Surface::natInit() {
     
     XTextProperty tp;
     tp.value = (unsigned char*)"Ibex";
-    tp.nitems = 3;
+    tp.nitems = 4;
     tp.encoding = XA_STRING;
     tp.format = 8;
     XSetTextProperty(display, (*((Window*)window)), &tp, XA_WM_CLASS);
@@ -747,7 +747,6 @@ void org::ibex::plat::X11::natInit() {
     // FIXME: don't know why (True, False) is the best solution...
     if(XmuLookupStandardColormap(display, screen_num, visual->visualid, colorDepth, XA_RGB_BEST_MAP, True, False) == 0)
         org::ibex::Platform::criticalAbort(JvNewStringLatin1("ERROR: XmuLookupStandardColormap failed"));
-    
     XStandardColormap* best_map_info = NULL;
     int count;
     if (XGetRGBColormaps(display, RootWindow(display, screen_num), &best_map_info, &count, XA_RGB_BEST_MAP) == 0)
@@ -793,9 +792,9 @@ jstring org::ibex::plat::X11::_fileDialog(jstring suggestedFileName, jboolean wr
     if (WMRunModalFilePanelForDirectory(oPanel, NULL, buf, /*title*/ NULL, NULL) != True) return NULL;
     return JvNewStringLatin1(WMGetFilePanelFileName(oPanel));
   }
+  return NULL;
 }
 
-
 //////////////////////////////////////////////////////////////////////////////
 //////////////////////////////////////////////////////////////////////////////
 //////////////////////////////////////////////////////////////////////////////
@@ -2331,3 +2330,4 @@ XmuDeleteStandardColormap(Display *dpy, int screen, Atom property)
         }
 }
 
+