comparison org.eclipse.swt.gtk.linux.x86/src/org/eclipse/swt/widgets/Shell.d @ 51:c01d033c633a

[swt lin]
author Frank Benoit <benoit@tionex.de>
date Fri, 27 Mar 2009 19:58:06 +0100
parents 7a2dd761a8b2
children
comparison
equal deleted inserted replaced
50:d5075f5226e5 51:c01d033c633a
556 * Bug in metacity. Calling gdk_window_focus() with a timestamp more 556 * Bug in metacity. Calling gdk_window_focus() with a timestamp more
557 * recent than the last user interaction time can cause windows not 557 * recent than the last user interaction time can cause windows not
558 * to come forward in versions > 2.10.0. The fix is to use the last 558 * to come forward in versions > 2.10.0. The fix is to use the last
559 * user event time. 559 * user event time.
560 */ 560 */
561 if ( Unicode.toLower( display.windowManager ) ==/*eq*/ "metacity") { 561 if ( display.windowManager.toLowerCase() ==/*eq*/ "metacity") {
562 OS.gdk_window_focus (window, display.lastUserEventTime); 562 OS.gdk_window_focus (window, display.lastUserEventTime);
563 } else { 563 } else {
564 OS.gdk_window_focus (window, OS.GDK_CURRENT_TIME); 564 OS.gdk_window_focus (window, OS.GDK_CURRENT_TIME);
565 } 565 }
566 } 566 }
1660 * garbage after the last character in the title. 1660 * garbage after the last character in the title.
1661 * The fix is to pad the title. 1661 * The fix is to pad the title.
1662 */ 1662 */
1663 int length_ = string.length; 1663 int length_ = string.length;
1664 char [] chars = new char [Math.max (6, length_) + 1]; 1664 char [] chars = new char [Math.max (6, length_) + 1];
1665 chars = string[ 0 .. length_]; 1665 chars[ 0 .. length_ ] = string[ 0 .. length_];
1666 for (int i=length_; i<chars.length; i++) chars [i] = ' '; 1666 for (int i=length_; i<chars.length; i++) chars [i] = ' ';
1667 OS.gtk_window_set_title (cast(GtkWindow*)shellHandle, toStringz( chars ) ); 1667 OS.gtk_window_set_title (cast(GtkWindow*)shellHandle, toStringz( chars ) );
1668 } 1668 }
1669 1669
1670 public override void setVisible (bool visible) { 1670 public override void setVisible (bool visible) {