summaryrefslogtreecommitdiff
path: root/uitask_windows.c
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-11-05 14:12:57 -0500
committerPietro Gagliardi <[email protected]>2014-11-05 14:12:57 -0500
commit745fdc9dc6f7f0e59ba2e372327d59cf899929ca (patch)
treee0dbdaffe93e3555b394f7df80c4bb800cc4428c /uitask_windows.c
parentb632fef3b13dc082acbbbd8aaf6898c663da1c0b (diff)
More Windows window class logic simplification. This will be needed for read-only TextFields, next.
Diffstat (limited to 'uitask_windows.c')
-rw-r--r--uitask_windows.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/uitask_windows.c b/uitask_windows.c
index 49937c9..a713e60 100644
--- a/uitask_windows.c
+++ b/uitask_windows.c
@@ -59,7 +59,6 @@ void uimsgloop(void)
MSG msg;
int res;
HWND active, focus;
- WCHAR classchk[maxClassName + 1];
BOOL dodlgmessage;
for (;;) {
@@ -80,12 +79,11 @@ void uimsgloop(void)
// as for Tabs, we can't have both WS_TABSTOP and WS_EX_CONTROLPARENT set at the same time, so we hotswap the two styles to get the behavior we want
focus = GetFocus();
if (focus != NULL) {
- if (GetClassNameW(focus, classchk, maxClassName) == 0)
- xpanic("error getting name of focused window class for Area check", GetLastError());
- if (_wcsicmp(classchk, areaWindowClass) == 0) {
+ switch (windowClassOf(focus, areaWindowClass, WC_TABCONTROLW, NULL)) {
+ case 0: // areaWindowClass
uimsgloop_area(active, focus, &msg);
continue;
- } else if (_wcsicmp(classchk, WC_TABCONTROL) == 0) {
+ case 1: // WC_TABCONTROLW
uimsgloop_tab(active, focus, &msg);
continue;
}