mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-01-18 21:21:27 +00:00
linux crash on diacritics enter should be fixed
This commit is contained in:
parent
d8b421993d
commit
00c9d16925
@ -269,4 +269,9 @@ void ContextMenu::popup(const QPoint &p) {
|
||||
|
||||
ContextMenu::~ContextMenu() {
|
||||
clearActions();
|
||||
#if defined Q_OS_LINUX32 || defined Q_OS_LINUX64
|
||||
if (App::wnd()) {
|
||||
App::wnd()->activateWindow();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -25,6 +25,9 @@ int main(int argc, char *argv[]) {
|
||||
#ifdef _NEED_WIN_GENERATE_DUMP
|
||||
_oldWndExceptionFilter = SetUnhandledExceptionFilter(_exceptionFilter);
|
||||
#endif
|
||||
#ifdef _NEED_LINUX_GENERATE_DUMP
|
||||
//signal(SIGSEGV, _sigsegvHandler);
|
||||
#endif
|
||||
|
||||
InitOpenSSL _init;
|
||||
|
||||
|
@ -1365,3 +1365,18 @@ bool linuxMoveFile(const char *from, const char *to) {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef _NEED_LINUX_GENERATE_DUMP
|
||||
void _sigsegvHandler(int sig) {
|
||||
void *array[50] = {0};
|
||||
size_t size;
|
||||
|
||||
// get void*'s for all entries on the stack
|
||||
size = backtrace(array, 50);
|
||||
|
||||
// print out all the frames to stderr
|
||||
fprintf(stderr, "Error: signal %d:\n", sig);
|
||||
backtrace_symbols_fd(array, size, STDERR_FILENO);
|
||||
exit(1);
|
||||
}
|
||||
#endif
|
||||
|
@ -17,6 +17,9 @@ Copyright (c) 2014 John Preston, https://desktop.telegram.org
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <execinfo.h>
|
||||
#include <signal.h>
|
||||
|
||||
inline QString psServerPrefix() {
|
||||
return qsl("/tmp/");
|
||||
}
|
||||
@ -110,6 +113,9 @@ private:
|
||||
uint64 _psLastIndicatorUpdate;
|
||||
};
|
||||
|
||||
#ifdef _NEED_LINUX_GENERATE_DUMP
|
||||
void _sigsegvHandler(int sig);
|
||||
#endif
|
||||
|
||||
class PsApplication : public QApplication {
|
||||
Q_OBJECT
|
||||
|
@ -113,7 +113,7 @@ private:
|
||||
#ifdef _NEED_WIN_GENERATE_DUMP
|
||||
extern LPTOP_LEVEL_EXCEPTION_FILTER _oldWndExceptionFilter;
|
||||
LONG CALLBACK _exceptionFilter(EXCEPTION_POINTERS* pExceptionPointers);
|
||||
#endif _NEED_WIN_GENERATE_DUMP
|
||||
#endif
|
||||
|
||||
class PsApplication : public QApplication {
|
||||
Q_OBJECT
|
||||
|
@ -44,6 +44,8 @@ Copyright (c) 2014 John Preston, https://desktop.telegram.org
|
||||
|
||||
#if defined Q_OS_WIN
|
||||
#define _NEED_WIN_GENERATE_DUMP
|
||||
#elif defined Q_OS_LINUX32 || defined Q_OS_LINUX64
|
||||
#define _NEED_LINUX_GENERATE_DUMP
|
||||
#endif
|
||||
|
||||
#include "types.h"
|
||||
|
@ -852,7 +852,14 @@ void Window::layerHidden() {
|
||||
}
|
||||
|
||||
void Window::hideMediaview() {
|
||||
if (_mediaView && !_mediaView->isHidden()) _mediaView->hide();
|
||||
if (_mediaView && !_mediaView->isHidden()) {
|
||||
_mediaView->hide();
|
||||
#if defined Q_OS_LINUX32 || defined Q_OS_LINUX64
|
||||
if (App::wnd()) {
|
||||
App::wnd()->activateWindow();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
void Window::setInnerFocus() {
|
||||
|
Loading…
Reference in New Issue
Block a user