Xlib function calls from gtk1.2 ( embed mozilla )



Hi all,

I am having real trouble calling Xlib functions,
within my gtk 1.2 app ( which is the demo mozilla
1.4.2 TestGtkEmbed.cpp )

I would like to set some X Window properties (
redhat9.0 box ) using the functions XSetWMName and
XSetCommand.

snips of code:

#include "gtkmozembed.h"
#include <gtk/gtk.h>
#include <string.h>
#include <stdlib.h>
#include "X11/Xlib.h"
#include "X11/Xatom.h"
#include <gdk/gdkx.h>

.....

int
main(int argc, char **argv)
{
Display *display;
char* myname;
  myname = "Doug test";
...

  display = XOpenDisplay("");
 topwin = GDK_WINDOW_XWINDOW(
GTK_WIDGET(browser->topLevelWindow)->window );


 XGetWindowAttributes(display, topwin, &xwin_attr);
         g_print("Xwin Attrs: %i x %i + %i + %i .
%i\n",
 xwin_attr.width, xwin_attr.height, xwin_attr.x,
xwin_attr.y,
 xwin_attr.depth);


 ret = XGetWMClientMachine(display, topwin,
&text_prop_return );
  fprintf(stdout, "ret from XGetWMClient is %d %s \n",
ret,   text_prop_return.value );


prints out the correct details.

The problem is when I call :

 

 XStringListToTextProperty( &myname, 1, &text_prop );
   XSetWMName(display, topwin, &text_prop );


The WM_NAME X property is never updated.

I need to update these x properties for the window
manager WindowMaker.

Does anybody have experience calling these Xlib
functions from with a gtk app? I assume I have the top
level window id correct, because when I query the
window, the correct values come back. 

Its just I don't seem to be able to update any values.

Regards

Doug.






        
                
__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs  
http://hotjobs.sweepstakes.yahoo.com/careermakeover 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]