William Smith(deleted)
|
Re: Child Window Focus Question
|
William Smith(deleted)
03/06/2009 11:48 AM
post23798
|
Re: Child Window Focus Question
Misha, first, thanks for all the help you have been providing me. I definitely appreciate it.
Second, I'm still having some issues here with this approach. Attached is a screenshot of my app showing a dropdown. The
dropdown is a region owned by ROOT_RID. At the bottom it extends beyond my application window and covers up part of the
terminal. Even though it is in front of the terminal window, anything that scrolls in the terminal, corrupts the
content of the region. When I mouse over that part of the region it clears up because I do a repaint of the rows
triggered off the mouse move. However I don't know what kind of events will help me when there is no mouse or keyboard
input. Is there something I need to do differently as far as stacking order to help this? I noticed with various photon
apps that have dropdowns (using widgets I assume) they don't exhibit this behavior.
Here is the code I am using for creating the region:
JNIEXPORT jlong JNICALL Java_com_tridium_pwt_PwtApi_regionOpen0
(JNIEnv *env, jobject jobj, jlong prId, jdouble x, jdouble y, jdouble width, jdouble height)
{
PhRid_t rId;
PhArea_t area;
PhRect_t rect;
PhRegion_t region;
jlong jrId;
memset(®ion, 0, sizeof(region));
region.events_sense = Ph_EV_PTR_ALL | Ph_EV_KEY | Ph_EV_EXPOSE | Ph_EV_DRAG;
region.events_opaque = Ph_EV_PTR_ALL | Ph_EV_DRAW | Ph_EV_EXPOSE | Ph_EV_KEY;
region.origin.x = (int)x;
region.origin.y = (int)y;
region.parent = prId;
area.pos.x = 0;
area.pos.y = 0;
area.size.w = (int)width;
area.size.h = (int)height;
PhAreaToRect(&area, &rect);
rId = PhRegionOpen(Ph_REGION_PARENT |
Ph_REGION_ORIGIN |
Ph_REGION_EV_OPAQUE |
Ph_REGION_EV_SENSE |
Ph_REGION_RECT | Ph_REGION_DATA,
®ion, &rect, NULL);
if (rId <= 0)
{
throwPwtException(env, "Unable to open region");
return -1;
}
jrId = rId;
PgSetRegion(rId);
return jrId;
}
Thx,
Bill
|
|
|