This is the mail archive of the cygwin-xfree@cygwin.com mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Few minor issues


Earle,

Earle F. Philhower III wrote:

I looked for the code that does this (it is general X code, not Cygwin/XFree86-specific code) the last time that someone brought this up (wasn't it you?). I could not find the code and I won't be looking for it again. Someone else can do the searching of the source code tree under xc/programs/Xserver to try to find it. It is most likely in xc/programs/Xserver/hw/os or xc/programs/Xserver/hw/dix, but I couldn't find it in either of those directories.

Well, you could always throw out the 1st cursor positioning call since it is guaranteed
to be from the X server itself and not an application. That way you do not have to modify
any of the standard X server code, just the xwin/ directory files...



Damn, that is a good idea! It would certainly do the trick and I don't think it is incorrect at all. We would simply need a static to flag that we had dumped that mouse positioning message.


Nice idea.

The only problem is that I have already uploade this test release. I am just finishing up the change log now... bummer it won't make it for this release. Remind me if I forget next time.

...To hide from taskbar we may be able to use WS_EX_TOOLWINDOW flag for EXSTYLE attribute.
I am attaching an example for this.
Hiding from the taskbar? It isn't shown on my taskbar. I am using Windows XP... what version are you using?


It doesn't show up under W2K either.

Good to know.



I also noticed that an already existing exit dialog was not being brought to the foreground when the user performed another action that would display the dialog. The result was that the dialog box seemed to be lost and it seemed that you couldn't exit Cygwin/XFree86. I changed this to call SetForegroundWindow () for the dialog box when it already exists. This brings it to the top in response to such user-generated events.
Any ideas on how to get rid of the Maximize button on the dialog? I can do it by removing the WS_SYSMENU style... should we be using WS_SYSMENU or not? Not using WS_SYSMENU cause our icon to not be displayed on the upper-left hand corner, but I can't seem to find a flag that says "no maximize button".


This is just stylistic on my part, but why not just use a MessageBox?

Ah ha... at first that seems like a good idea. Then you try it and we end up borking Cygwin/XFree86 because Windows messages are processed in the wakeup/pre-blocking handlers in the X Server main loop. Thus, a block here is a death knell to any X Clients that are connected. Of course, you could spawn a thread to create the MessageBox, but that kinda defeats the whole purpose of using a MessageBox.


The nice thing about the type of dialog box we have is that it is non-blocking and it gets its messages via our own message loop that is processed in the wakeup/pre-blocking handlers as I said above.

Other
apps use one with MB_APPLMODAL when you're about to exit from them...

Here's what you need to do to get your exit dialog without the max/min buttons
/* Create dialog box */
g_hDlgExit = CreateDialogParam (g_hInstance, ...


+ SetWindowLong( g_hDlgExit, GWL_STYLE, GetWindowLong(g_hDlgExit, GWL_STYLE)&~(WS_MAXIMIZEBOX|WS_MINIMIZEBOX) );
+ SetWindowLong( g_hDlgExit, GWL_EXSTYLE, GetWindowLong(g_hDlgExit, GWL_EXSTYLE)&~WS_EX_APPWINDOW );
+ SetWindowPos( g_hDlgExit, 0, 0, 0, 0, 0, SWP_FRAMECHANGED|SWP_NOMOVE|SWP_NOZORDER|SWP_NOSIZE );


  /* Show the dialog box */
  ShowWindow (g_hDlgExit, SW_SHOW);


Very nice. I will play with that tomorrow.


Harold


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]