mirror of https://github.com/adamdruppe/arsd.git
off by one in utf8 to utf16 conversion on windows draw text
This commit is contained in:
parent
2f5277707c
commit
a772aa77ab
|
@ -914,13 +914,16 @@ enum WindowTypes : int {
|
||||||
undecorated,
|
undecorated,
|
||||||
/// A window that doesn't actually display on screen. You can use it for cases where you need a window handle to communicate or something.
|
/// A window that doesn't actually display on screen. You can use it for cases where you need a window handle to communicate or something.
|
||||||
hidden,
|
hidden,
|
||||||
|
/// A drop down menu, such as from a menu bar
|
||||||
|
dropdownMenu,
|
||||||
|
/// A popup menu, such as from a right click
|
||||||
|
popupMenu,
|
||||||
/*
|
/*
|
||||||
|
menu, /// a tearable menu bar
|
||||||
splashScreen, /// a loading splash screen for your application
|
splashScreen, /// a loading splash screen for your application
|
||||||
tooltip, /// A tiny window showing temporary help text or something.
|
tooltip, /// A tiny window showing temporary help text or something.
|
||||||
notification, /// A popup bubble notification
|
notification, /// A popup bubble notification
|
||||||
comboBoxDropdown,
|
comboBoxDropdown,
|
||||||
dropdownMenu,
|
|
||||||
popupMenu,
|
|
||||||
dialog,
|
dialog,
|
||||||
toolbar
|
toolbar
|
||||||
*/
|
*/
|
||||||
|
@ -2141,7 +2144,7 @@ wchar[] makeWindowsString(in char[] str, wchar[] buffer, bool zeroTerminate = tr
|
||||||
}
|
}
|
||||||
if(zeroTerminate) {
|
if(zeroTerminate) {
|
||||||
buffer[got] = 0;
|
buffer[got] = 0;
|
||||||
got++;
|
//got++;
|
||||||
}
|
}
|
||||||
return buffer[0 .. got];
|
return buffer[0 .. got];
|
||||||
}
|
}
|
||||||
|
@ -4809,6 +4812,9 @@ version(Windows) {
|
||||||
case WindowTypes.hidden:
|
case WindowTypes.hidden:
|
||||||
_hidden = true;
|
_hidden = true;
|
||||||
break;
|
break;
|
||||||
|
case WindowTypes.dropdownMenu:
|
||||||
|
case WindowTypes.popupMenu:
|
||||||
|
// FIXME
|
||||||
}
|
}
|
||||||
|
|
||||||
hwnd = CreateWindow(cn.ptr, toWStringz(title), style,
|
hwnd = CreateWindow(cn.ptr, toWStringz(title), style,
|
||||||
|
@ -6310,7 +6316,20 @@ version(X11) {
|
||||||
XSelectInput(display, window, EventMask.StructureNotifyMask); // without this, we won't get destroy notification
|
XSelectInput(display, window, EventMask.StructureNotifyMask); // without this, we won't get destroy notification
|
||||||
goto hiddenWindow;
|
goto hiddenWindow;
|
||||||
//break;
|
//break;
|
||||||
|
|
||||||
|
case WindowTypes.dropdownMenu:
|
||||||
|
atoms[0] = GetAtom!"_NET_WM_WINDOW_TYPE_DROPDOWN_MENU"(display);
|
||||||
|
motifHideDecorations();
|
||||||
|
break;
|
||||||
|
case WindowTypes.popupMenu:
|
||||||
|
atoms[0] = GetAtom!"_NET_WM_WINDOW_TYPE_POPUP_MENU"(display);
|
||||||
|
motifHideDecorations();
|
||||||
|
break;
|
||||||
/+
|
/+
|
||||||
|
case WindowTypes.menu:
|
||||||
|
atoms[0] = GetAtom!"_NET_WM_WINDOW_TYPE_MENU"(display);
|
||||||
|
motifHideDecorations();
|
||||||
|
break;
|
||||||
case WindowTypes.desktop:
|
case WindowTypes.desktop:
|
||||||
atoms[0] = GetAtom!"_NET_WM_WINDOW_TYPE_DESKTOP"(display);
|
atoms[0] = GetAtom!"_NET_WM_WINDOW_TYPE_DESKTOP"(display);
|
||||||
break;
|
break;
|
||||||
|
@ -6332,12 +6351,6 @@ version(X11) {
|
||||||
case WindowTypes.dialog:
|
case WindowTypes.dialog:
|
||||||
atoms[0] = GetAtom!"_NET_WM_WINDOW_TYPE_DIALOG"(display);
|
atoms[0] = GetAtom!"_NET_WM_WINDOW_TYPE_DIALOG"(display);
|
||||||
break;
|
break;
|
||||||
case WindowTypes.dropdownMenu:
|
|
||||||
atoms[0] = GetAtom!"_NET_WM_WINDOW_TYPE_DROPDOWN_MENU"(display);
|
|
||||||
break;
|
|
||||||
case WindowTypes.popupMenu:
|
|
||||||
atoms[0] = GetAtom!"_NET_WM_WINDOW_TYPE_POPUP_MENU"(display);
|
|
||||||
break;
|
|
||||||
case WindowTypes.tooltip:
|
case WindowTypes.tooltip:
|
||||||
atoms[0] = GetAtom!"_NET_WM_WINDOW_TYPE_TOOLTIP"(display);
|
atoms[0] = GetAtom!"_NET_WM_WINDOW_TYPE_TOOLTIP"(display);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue