nanogui: GrMoveWindow and NanoWM


Previous by date: 14 Nov 2006 15:36:13 +0000 Re: Problem With GrGetNextEventTimeout()?, Greg Haerr
Next by date: 14 Nov 2006 15:36:13 +0000 Re: GrMoveWindow and NanoWM, Greg Haerr
Previous in thread:
Next in thread: 14 Nov 2006 15:36:13 +0000 Re: GrMoveWindow and NanoWM, Greg Haerr

Subject: GrMoveWindow and NanoWM
From: "Reiser, Markus" ####@####.####
Date: 14 Nov 2006 15:36:13 +0000
Message-Id: <FDAC6610BC0221488AE1694FB9A20F29055F858F@KHED162A.ww004.siemens.net>

Hi all,

I'm using nano-X, nanowm and a little application 
creating a window which should move its 
window position after a click into the window.

This is just a little demo, of what I want:

=========================================================

#define MWINCLUDECOLORS
#include <stdio.h>
#include "nano-X.h"

int main(int ac,char **av)
{
    GR_WINDOW_ID w;
    GR_GC_ID gc;
    GR_EVENT event;
    GR_COORD x = 20;

    if (GrOpen() < 0) {
        printf("Can't open graphics\n");
        exit(1);
    }

    w = GrNewWindow(GR_ROOT_WINDOW_ID, x, 20, 100, 60,
        0, WHITE, BLUE);
    gc = GrNewGC();
    GrSetGCForeground(gc, BLACK);
    GrSetGCUseBackground(gc, GR_FALSE);

    GrSelectEvents(w, GR_EVENT_MASK_EXPOSURE |
GR_EVENT_MASK_BUTTON_DOWN);
    GrMapWindow(w);

    for (;;)
    {
        GrGetNextEvent(&event);
        switch (event.type) {
            case GR_EVENT_TYPE_EXPOSURE:
                GrText(w, gc, 10, 30, "Hello World", -1, GR_TFASCII);
                break;
            case GR_EVENT_TYPE_BUTTON_DOWN:
                printf("click and move right !!!\n");
                GrMoveWindow(w,x+=20,20);
                break;
        }
    }
    GrClose();
    return 0;
}

=====================================================================

If I start the application above on top of nanowm - clicking into the
window,
only window content moves, but not the window itself. The window
decoration of 
nanowm

Starting the application without nanowm, it works fine !

What am I doing wrong ? Any suggestions ?

Thanks
Markus

Previous by date: 14 Nov 2006 15:36:13 +0000 Re: Problem With GrGetNextEventTimeout()?, Greg Haerr
Next by date: 14 Nov 2006 15:36:13 +0000 Re: GrMoveWindow and NanoWM, Greg Haerr
Previous in thread:
Next in thread: 14 Nov 2006 15:36:13 +0000 Re: GrMoveWindow and NanoWM, Greg Haerr


Powered by ezmlm-browse 0.20.