[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    Segmentation fault when running NETRootInfo info(QX11Info::display(),
From:       vatbier <vatbier () yahoo ! com>
Date:       2008-10-30 22:55:30
Message-ID: 54397.704.qm () web50311 ! mail ! re2 ! yahoo ! com
[Download RAW message or body]

I'm trying to make a program that toggles showdesktop.
I made this from the source code of plasma_applet_showdesktop.so:
NETRootInfo info(QX11Info::display(), 0);
info.setShowingDesktop(true);

But the NetRootInfo constructor gives a segmentation fault.
Can anyone tell me why?

I'm using Mandriva 2009, KDE 4.1.2.

See attachments

vatbier


      
["myshowdesktop.cpp" (text/x-c++src)]

// myShowDesktop.cpp, 

#include <iostream>
#include <string>
#include <netwm.h>
#include <QX11Info>
using namespace configlib;
using namespace std;
 

int main()
{
    NETRootInfo info(QX11Info::display(), 0);		// HERE OCCURS THE SEGMENTATION FAULT

    
    info.setShowingDesktop(true);

}
["CMakeLists.txt" (text/x-cmake)]

project(mijnshowdesktop)
find_package(KDE4 REQUIRED)
include(KDE4Defaults)
include(MacroOptionalAddSubdirectory)

add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS})

include_directories( ${CMAKE_CURRENT_SOURCE_DIR} ${KDE4_INCLUDES} )
set(mySources myshowdesktop.cpp)
kde4_add_executable(mijnshowdesktop ${mySources})
target_link_libraries(mijnshowdesktop ${KDE4_KDEUI_LIBS} ${KDE4_KPARTS_LIBS} )


_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic