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

List:       kde-commits
Subject:    kdelibs/kdecore
From:       Luboš Luňák <l.lunak () kde ! org>
Date:       2005-04-15 11:29:51
Message-ID: 20050415112951.71A8C5FA () office ! kde ! org
[Download RAW message or body]

CVS commit by lunakl: 

Remap properly the properties array.


  M +11 -3     netwm.cpp   1.138


--- kdelibs/kdecore/netwm.cpp  #1.137:1.138
@@ -686,10 +686,18 @@ NETRootInfo::NETRootInfo(Display *displa
     p->kde_system_tray_windows_count = 0;
     setDefaultProperties();
-    if( properties_size > PROPERTIES_SIZE ) {
+    if( properties_size > 2 ) {
         fprintf( stderr, "NETWinInfo::NETWinInfo(): properties array too large\n");
-        properties_size = PROPERTIES_SIZE;
+        properties_size = 2;
     }
     for( int i = 0; i < properties_size; ++i )
-        p->client_properties[ i ] = properties[ i ];
+        // remap from [0]=NET::Property,[1]=NET::Property2
+        switch( i ) {
+            case 0:
+                p->client_properties[ PROTOCOLS ] = properties[ i ];
+                break;
+            case 1:
+                p->client_properties[ PROTOCOLS2 ] = properties[ i ];
+                break;
+        }
     for( int i = 0; i < PROPERTIES_SIZE; ++i )
         p->properties[ i ] = 0;


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

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