From b0ef07a7871508e4a89d4f5f633261c024b2a038 Mon Sep 17 00:00:00 2001 From: Cyril Deguet Date: Mon, 9 Jun 2003 19:08:33 +0000 Subject: [PATCH] * fixed a segfault in FileInfo when p_info->psz_name == NULL but there are still other segfaults sometimes in FileInfo !! --- modules/gui/skins/src/skin_common.h | 3 ++- modules/gui/skins/x11/x11_window.cpp | 13 ++++++++++--- modules/gui/wxwindows/fileinfo.cpp | 4 ++-- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/modules/gui/skins/src/skin_common.h b/modules/gui/skins/src/skin_common.h index a67f8e1514..91fe3370b7 100644 --- a/modules/gui/skins/src/skin_common.h +++ b/modules/gui/skins/src/skin_common.h @@ -2,7 +2,7 @@ * skin_common.h: Private Skin interface description ***************************************************************************** * Copyright (C) 2003 VideoLAN - * $Id: skin_common.h,v 1.17 2003/06/09 14:04:20 asmax Exp $ + * $Id: skin_common.h,v 1.18 2003/06/09 19:08:33 asmax Exp $ * * Authors: Olivier Teulière * Emmanuel Puig @@ -43,6 +43,7 @@ class wxIcon; #define MOUSE_LEFT (1<<0) #define MOUSE_RIGHT (1<<1) #define KEY_CTRL (1<<2) +#define KEY_SHIFT (1<<3) //--------------------------------------------------------------------------- diff --git a/modules/gui/skins/x11/x11_window.cpp b/modules/gui/skins/x11/x11_window.cpp index 7f6e471892..e0a1a5826b 100644 --- a/modules/gui/skins/x11/x11_window.cpp +++ b/modules/gui/skins/x11/x11_window.cpp @@ -2,7 +2,7 @@ * x11_window.cpp: X11 implementation of the Window class ***************************************************************************** * Copyright (C) 2003 VideoLAN - * $Id: x11_window.cpp,v 1.20 2003/06/09 14:04:20 asmax Exp $ + * $Id: x11_window.cpp,v 1.21 2003/06/09 19:08:33 asmax Exp $ * * Authors: Cyril Deguet * @@ -262,8 +262,11 @@ bool X11Window::ProcessOSEvent( Event *evt ) button = 0; if( ((XButtonEvent *)p2 )->state & ControlMask ) { - // Control key pressed button |= KEY_CTRL; + } + if( ((XButtonEvent *)p2 )->state & ShiftMask ) + { + button |= KEY_SHIFT; } switch( ( (XButtonEvent *)p2 )->button ) @@ -309,9 +312,13 @@ bool X11Window::ProcessOSEvent( Event *evt ) button = 0; if( ((XButtonEvent *)p2 )->state & ControlMask ) { - // Control key pressed button |= KEY_CTRL; } + if( ((XButtonEvent *)p2 )->state & ShiftMask ) + { + button |= KEY_SHIFT; + } + switch( ( (XButtonEvent *)p2 )->button ) { case 1: diff --git a/modules/gui/wxwindows/fileinfo.cpp b/modules/gui/wxwindows/fileinfo.cpp index 070980ebf9..dfa9ece49e 100644 --- a/modules/gui/wxwindows/fileinfo.cpp +++ b/modules/gui/wxwindows/fileinfo.cpp @@ -2,7 +2,7 @@ * fileinfo.cpp : wxWindows plugin for vlc ***************************************************************************** * Copyright (C) 2000-2001 VideoLAN - * $Id: fileinfo.cpp,v 1.15 2003/06/05 21:22:27 gbazin Exp $ + * $Id: fileinfo.cpp,v 1.16 2003/06/09 19:08:33 asmax Exp $ * * Authors: Sigmund Augdal * @@ -117,7 +117,7 @@ void FileInfo::UpdateFileInfo() { input_thread_t *p_input = p_intf->p_sys->p_input; - if( !p_input || p_input->b_dead ) + if( !p_input || p_input->b_dead || !p_input->psz_name ) { if( fileinfo_root ) { -- 2.39.2