Working directly with X, Xlib, XUtils, and so on, is actually a lot more pleasant than I was lead to believe. However there are a couple of annoying bits. One of which, is handling events generated by XServer, and the WindowManager (WM) differently. Since the Chrome, or elements around your application, are supplied by the WM, you will need to listen to a message from it, and not a standard EventType from XServer.
A lot of language battles and flame wars start by criticizing Pascal for its large file size, when the actual application is simple. For example a hello world application being 175KB, while C using GCC produces a 8.6KB executable. Pascal is capable of creating smaller files than the 175KB behemoth. Let's go over 1 change which make your Pascal Executable Size smaller.
Pascal is often an overlooked or even disregarded language. I know I can't change that, but I can help you to learn and understand Pascal. Pascal is a great language to learn, and rather easy too. It reads nicely, and most of the semantics make perfect sense. I want to embark on a short journey to teach you Pascal, starting with Hello World, and ending with much more complicated application, yet to be determined. This is mainly due to the lack of my creativity.