[<<] [<] Page 1 of 1 [>] [>>] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: [nanogui] GrMoveWindow and NanoWM
From: "Greg Haerr" ####@####.#### Date: 14 Nov 2006 16:17:57 +0000 Message-Id: <08fb01c70808$643f0240$6401a8c0@winXP> > 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 ! Markus - This sounds like a bug with the window manager, nanowm. When nanowm is running, programs aren't supposed to call GrMoveWindow, since nanowm is supposed to manage the windows location. To get this to work, you would need to modifiy nanowm so that it moves its container window (that's the window frame) when the child window move report comes in. Look at nanowm source for more details on how it works. I think the server reports window moves for CHLD_UPDATE events. If not, then the server would need modification to report this event so nanowm could handle it. Regards, Greg | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[<<] [<] Page 1 of 1 [>] [>>] |