2008-05-22 Atsushi Enomoto <atsushi@ximian.com>
authorAtsushi Eno <atsushieno@gmail.com>
Thu, 22 May 2008 17:20:09 +0000 (17:20 -0000)
committerAtsushi Eno <atsushieno@gmail.com>
Thu, 22 May 2008 17:20:09 +0000 (17:20 -0000)
        * X11Keyboard.cs : set XIM font size to somewhat reasonable
          number (ideally the input textbox size, but that could be
          too messy).

svn path=/trunk/mcs/; revision=103809

mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
mcs/class/Managed.Windows.Forms/System.Windows.Forms/X11Keyboard.cs

index 69dc848daccbf692e893bcd43a561d449aa12696..936ef9ac9b0ad7e74f401caef1b9ae04c2cff3fa 100644 (file)
@@ -1,3 +1,9 @@
+2008-05-22  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * X11Keyboard.cs : set XIM font size to somewhat reasonable
+         number (ideally the input textbox size, but that could be
+         too messy).
+
 2008-05-22  Jonathan Pobst  <monkey@jpobst.com>
 
        * ToolStripTextBox.cs: List for the TextBox's TextChanged and fire
index 6c1f11b629225b9328f783f8806bc6bfb45dc001..8566ef48dd668fb04d8a9a3567ebfa995f1c8780 100644 (file)
@@ -902,7 +902,9 @@ namespace System.Windows.Forms {
                {
                        IntPtr list;
                        int count;
-                       IntPtr fontSet = XCreateFontSet (display, "*", out list, out count, IntPtr.Zero);
+                       Control c = Control.FromHandle (window);
+                       string xlfd = String.Format ("-*-*-*-*-*-*-{0}-*-*-*-*-*-*-*", (int) c.Font.Size);
+                       IntPtr fontSet = XCreateFontSet (display, xlfd, out list, out count, IntPtr.Zero);
                        XPoint spot = new XPoint ();
                        spot.X = 0;
                        spot.Y = 0;