mirror of
https://github.com/ONLYOFFICE/desktop-apps.git
synced 2026-04-07 14:09:22 +08:00
[win] debug
This commit is contained in:
@ -45,9 +45,9 @@ void CCefEventsGate::onDocumentName(void * data)
|
||||
RELEASEINTERFACE(pData);
|
||||
}
|
||||
|
||||
void CCefEventsGate::onDocumentType(int id, int type)
|
||||
void CCefEventsGate::onDocumentType(int, int type)
|
||||
{
|
||||
if (id) { type; }
|
||||
m_panel->data()->setContentType(AscEditorType(type));
|
||||
}
|
||||
|
||||
void CCefEventsGate::onDocumentSave(int, bool cancel)
|
||||
|
||||
@ -65,7 +65,7 @@ public slots:
|
||||
virtual void onDocumentPrint(int current, uint count) = 0;
|
||||
virtual void onDocumentLoadFinished(int);
|
||||
virtual void onDocumentReady(int);
|
||||
virtual void onDocumentType(int, int type);
|
||||
virtual void onDocumentType(int id, int type);
|
||||
|
||||
virtual void onFileLocation(int id, QString path) = 0;
|
||||
virtual void onLocalFileSaveAs(void *) = 0;
|
||||
|
||||
@ -240,9 +240,19 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void onDocumentType(int, int type) override
|
||||
void onDocumentType(int vid, int type) override
|
||||
{
|
||||
CCefEventsGate::onDocumentType(vid, type);
|
||||
|
||||
if ( canExtendTitle() && window->isCustomWindowStyle() ) {
|
||||
QColor color;
|
||||
switch (type) {
|
||||
case etDocument: color = QColor(TAB_COLOR_DOCUMENT); break;
|
||||
case etPresentation: color = QColor(TAB_COLOR_PRESENTATION); break;
|
||||
case etSpreadsheet: color = QColor(TAB_COLOR_SPREADSHEET); break;
|
||||
}
|
||||
|
||||
window->m_bgColor = RGB(color.red(), color.green(), color.blue());
|
||||
window->m_css = prepare_editor_css(type);
|
||||
|
||||
QString css(AscAppManager::getWindowStylesheets(window->m_dpiRatio));
|
||||
|
||||
@ -167,7 +167,7 @@ LRESULT CALLBACK CSingleWindowPlatform::WndProc(HWND hWnd, UINT message, WPARAM
|
||||
} else
|
||||
if ( top_window ) {
|
||||
top_window = NULL;
|
||||
if ( hw == AscAppManager::topWindow()->handle() )
|
||||
if ( AscAppManager::topWindow() && hw == AscAppManager::topWindow()->handle() )
|
||||
is_mainwindow_prev = true;
|
||||
}
|
||||
|
||||
@ -179,8 +179,10 @@ LRESULT CALLBACK CSingleWindowPlatform::WndProc(HWND hWnd, UINT message, WPARAM
|
||||
}
|
||||
|
||||
case WM_SETFOCUS: {
|
||||
if ( !window->m_closed ) {
|
||||
// window->focusMainPanel();
|
||||
window->focus();
|
||||
window->focus();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user