Changeset 99 for trunk/src/gui/kernel/qapplication_pm.cpp
- Timestamp:
- Aug 5, 2009, 3:19:05 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gui/kernel/qapplication_pm.cpp
r98 r99 91 91 static void releaseAutoCapture(); 92 92 93 static void unregWinClasses();94 95 93 extern QCursor *qt_grab_cursor(); 96 94 97 extern "C"MRESULT EXPENTRY QtWndProc(HWND, ULONG, MPARAM, MPARAM);95 MRESULT EXPENTRY QtWndProc(HWND, ULONG, MPARAM, MPARAM); 98 96 99 97 class QETWidget : public QWidget // event translator widget … … 189 187 void qt_cleanup() 190 188 { 191 unregWinClasses();192 189 QPixmapCache::clear(); 193 190 … … 224 221 return false; 225 222 #endif 226 }227 228 typedef QSet<QString> WinClassNameHash;229 Q_GLOBAL_STATIC(WinClassNameHash, winclassNames)230 231 // register window class232 const QString qt_reg_winclass(QWidget *w)233 {234 int flags = w->windowFlags();235 int type = flags & Qt::WindowType_Mask;236 237 QString cname;238 ULONG style = 0;239 240 if (type == Qt::Window) {241 // this class is for frame window clients when WC_FRAME is used.242 cname = QLatin1String("QWindow");243 style |= CS_MOVENOTIFY;244 } else if (type == Qt::Popup || type == Qt::Tool || type == Qt::ToolTip) {245 cname = QLatin1String("QPopup");246 // @todo do we really want SAVEBITS here?247 style |= CS_SAVEBITS;248 } else {249 cname = QLatin1String("QWidget");250 }251 252 if (winclassNames()->contains(cname)) // already registered in our list253 return cname;254 255 // QT_EXTRAWINDATASIZE is defined in qwindowdefs_pm.h256 WinRegisterClass(0, cname.toLatin1(), QtWndProc, style, QT_EXTRAWINDATASIZE);257 258 winclassNames()->insert(cname);259 return cname;260 }261 262 static void unregWinClasses()263 {264 // there is no need to unregister private window classes -- it is done265 // automatically upon process termination.266 winclassNames()->clear();267 223 } 268 224 … … 466 422 // QtWndProc() receives all messages from the main event loop 467 423 468 extern "C"469 424 MRESULT EXPENTRY QtWndProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) 425 426 427 428 429 430 431 432 470 433 { 471 434 // @todo implement
Note:
See TracChangeset
for help on using the changeset viewer.