Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Windows doesn't have the same client/server overhead as X though.

Yes it does. You think they run that in the same address space? When there are multiple processes with different privilege levels running their UIs? Maybe this comment was accurate for Win3.1, but for a long time there is absolutely a client server architecture behind it.

Anyway one of my favorite uses of HWND is to use a non visible window as a worker thread mechanism. Each HWND is tied to a message pump in the thread that owns it. So you can send it messages, and boom, you have a thread API...



On all "Classic" Windows and on NT from NT4 until DWM in Vista, GDI was not client-server instead it would draw directly to VRAM With some kernel assistance on NT (before NT4, GDI calls were handled by separate server process).

This is why misbehaving application could get you the famous "trailing window" effect where moving a window would leave partly painted trace of it behind - you had to wait for some other coffee to properly repaint that other area.

With DWM, your GDI windows are backed by memory that at most will be a texture in DirectX, which will be then composited by DWM (equivalent of X11 extensions to capture window drawing into pixmap instead of lowest common denominator implementation of DIX/DDX that would draw immediately to framebuffer)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: