From b9ff72c573ede6d8659f5768f43ee9f397723208 Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Sun, 8 Feb 2026 17:43:49 +0100 Subject: [PATCH] Revert "Prefix user-set window class name" (Windows only) ... introduced in commit 81c965f8e29c7b9fb68e9914d4223ab5fe293d1f. Note: we must not change the xclass (WNDCLASS) set by the user. Setting another xclass() in FLTK demo programs where the name might conflict with system WNDCLASS's is the better choice. --- src/Fl_win32.cxx | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx index b5aca1c78..0f7319143 100644 --- a/src/Fl_win32.cxx +++ b/src/Fl_win32.cxx @@ -1,7 +1,7 @@ // // Windows-specific code for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2025 by Bill Spitzak and others. +// Copyright 1998-2026 by Bill Spitzak and others. // // This library is free software. Distribution and use rights are outlined in // the file "COPYING" which should have been included with this file. If this @@ -2178,14 +2178,6 @@ void Fl_WinAPI_Window_Driver::makeWindow() { if (!first_class_name) { first_class_name = class_name; } -// Prefix user-set window class name by "FLTK", unless it's already here, -// to avoid collision with system-defined window class names (example "edit") - if (strncmp(class_name, "FLTK", 4)) { - static char new_class_name[100]; - snprintf(new_class_name, sizeof(new_class_name), "FLTK-%s", class_name); - class_name = new_class_name; - } - //fprintf(stderr,"makeWindow: class_name=%s\n",class_name);fflush(stderr); wchar_t class_namew[100]; // (limited) buffer for Windows class name