Opened 6 years ago

Closed 6 years ago

#69 closed defect (fixed)

Trying to add the lSwitcher widget to a second XCenter hangs the system

Reported by: Gregg Young Owned by: Gregg Young
Priority: major Milestone: 2.9.0
Component: widget Version:
Keywords: Cc:

Description

At minimum it prevents the second XCenter from closing.

Change History (3)

comment:1 Changed 6 years ago by Gregg Young

Information about this problem from Rich Walse:

A widget's WgtInitModule?() is akin to a DLL's InitTerm?(). It is called when the first XCenter opens and loads all the widget DLLs it can find. It is _not_ called each time a new copy of XCenter is opened because the DLL is already loaded. You would have to close all open XCenters then reopen one to have it called again within the same session.

As such, having your queryAppInstance() in WgtInitModule?() doesn't
accomplish much. All it does is prevent someone from killing their
standalone version of lSwitcher and installing the widget version.
Instead, calling queryAppInstance() should be just about the first
thing you do when your window proc receives WM_CREATE.

Again, I have to emphasize that all non-trivial activities must be
done in response to WM_CREATE. Registering a widget-specific window
class in WgtInitModule?() gives XCenter a way to activate your widget should the need arise. However, activation doesn't actually happen until XCenter creates a window of that class and PM sends you a WM_CREATE to let you know you're "live". Only at that point can you really decide whether to fish or cut bait.

comment:2 Changed 6 years ago by Gregg Young

Owner: set to Gregg Young
Status: newaccepted

CS [139]

comment:3 Changed 6 years ago by Gregg Young

Resolution: fixed
Status: acceptedclosed
Note: See TracTickets for help on using tickets.