Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
BroadcastCommunity.qnx.com will be offline from May 31 6:00pm until June 2 12:00AM for upcoming system upgrades. For more information please go to https://community.qnx.com/sf/discussion/do/listPosts/projects.bazaar/discussion.bazaar.topc28418
Forum Topic - Handling Ph_WM_RESIZE in 6.4.1 (6.4.0): Page 1 of 13 (13 Items)
   
Handling Ph_WM_RESIZE in 6.4.1 (6.4.0)  
The window has been initialized using these flags:
   PtSetArg(&winargs[winargc++], Pt_ARG_WINDOW_MANAGED_FLAGS, Pt_FALSE, Ph_WM_APP_DEF_MANAGED);
   PtSetArg(&winargs[winargc++], Pt_ARG_WINDOW_MANAGED_FLAGS, Pt_TRUE, Ph_WM_BACKDROP | Ph_WM_TOFRONT | Ph_WM_COLLAPSE |
 Ph_WM_FFRONT | Ph_WM_FOCUS | Ph_WM_HELP | Ph_WM_HIDE | Ph_WM_MAX | Ph_WM_MENU | Ph_WM_MOVE | Ph_WM_RESIZE | 
Ph_WM_RESTORE | Ph_WM_TASKBAR | Ph_WM_TOBACK);

   PtSetArg(&winargs[winargc++], Pt_ARG_WINDOW_NOTIFY_FLAGS, Pt_FALSE, Ph_WM_RESIZE | Ph_WM_CLOSE | Ph_WM_HELP);
   PtSetArg(&winargs[winargc++], Pt_ARG_WINDOW_NOTIFY_FLAGS, Pt_TRUE, Ph_WM_CLOSE | Ph_WM_COLLAPSE | Ph_WM_FOCUS | 
Ph_WM_MAX | Ph_WM_MOVE  | Ph_WM_RESIZE | Ph_WM_RESTORE | Ph_WM_HIDE);

I can't catch Ph_WM_RESIZE event with these parameters because this event is not emitted after window resize.

When Ph_WM_RESIZE is removed from Pt_ARG_WINDOW_MANAGED_FLAGS flags, the Ph_WM_RESIZE is emitted, but as far as I can 
know I need manually resize window and change its position if resize event is not managed by WM.

Pt_ARG_POS resource can be changed without any problem, window changes its position, but Pt_ARG_DIM resource settings 
are ignored by PtWindow widget. In 6.3.2 behavior was different.

My thoughts was about maximum/minimum widget dimension setting problem, by I set:

   winsize.w=0;
   winsize.h=0;
   PtSetArg(&winargs[winargc++], Pt_ARG_MAX_HEIGHT, 0, 0);
   PtSetArg(&winargs[winargc++], Pt_ARG_MAX_WIDTH, 0, 0);
   PtSetArg(&winargs[winargc++], Pt_ARG_MIN_HEIGHT, 0, 0);
   PtSetArg(&winargs[winargc++], Pt_ARG_MIN_WIDTH, 0, 0);
   PtSetArg(&winargs[winargc++], Pt_ARG_MAXIMUM_DIM, &winsize, 0);
   PtSetArg(&winargs[winargc++], Pt_ARG_MINIMUM_DIM, &winsize, 0);

This doesn't helps me to resize window widget. And later:

   PtSetArg(&winargs[winargc++], Pt_ARG_MAX_HEIGHT, 0, 0);
   PtSetArg(&winargs[winargc++], Pt_ARG_MAX_WIDTH, 0, 0);
   PtSetArg(&winargs[winargc++], Pt_ARG_MIN_HEIGHT, 0, 0);
   PtSetArg(&winargs[winargc++], Pt_ARG_MIN_WIDTH, 0, 0);
   winsize.w=65536;
   winsize.h=65536;
   PtSetArg(&winargs[winargc++], Pt_ARG_MAXIMUM_DIM, &winsize, 0);
   winsize.w=0;
   winsize.h=0;
   PtSetArg(&winargs[winargc++], Pt_ARG_MINIMUM_DIM, &winsize, 0);

This doesn't work too.

What am I missed ?

P.S. Documentation doesn't have nothing about Pt_ARG_MINIMUM_DIM/Pt_ARG_MAXIMUM_DIM default value 0,0 behavior. What  0,
0 does ? Is it the same as in the Pt_ARG_MAX_WIDTH/Pt_ARG_MAX_HEIGHT ?