jd:/dev/blog

Aller au contenu | Aller au menu | Aller à la recherche

mardi, décembre 22 2009

Python cairo and XCB support

cairo has a Python binding (pycairo) since a long time, and some months ago a Python binding for XCB (xpyb) has been released.

Pycairo has no support for creating Xlib surfaces. You can get a Xlib surface from PyGTK and then use Pycairo to draw on it, but there's no way to create one directly.

What I've done is make Pycairo aware of xpyb so it can creates directly an XCB surface from a XCB connection and a drawable.

As said in my mail to the XCB list, I'm now waiting for a review before pushing this upstream. :-)

For the first time, I guess, XCB has beat Xlib support! ;-)

mercredi, août 5 2009

Today's bad pun

If X.Org does a press release, is this an event?

/me goes hidding.

mercredi, février 11 2009

OpenOffice is better as a pager than as a text processor

Since several month, awesome users have reported a bug with OpenOffice.org. When using OOo and clicking on a menu, or using the mouse wheel to read a document, the currently selected tag (desktop) will change automagically to another one.

I've digged into awesome and found that awesome received a _NET_CURRENT_DESKTOP request. As defined by EWMH, this kind of request are sent by a pager to change the active desktop.

That was weird. Nobody is using a pager here. So, I just kicked my gdb out, attached it to OOo, breaking on XSendEvent call. And I got it:

Breakpoint 1, XSendEvent (dpy=0x1a00080, w=483, propagate=0, event_mask=1572864, event=0x7fff1fd70d70)
   at ../../src/SendEvent.c:46
(gdb) bt
#0  XSendEvent (dpy=0x1a00080, w=483, propagate=0, event_mask=1572864, event=0x7fff1fd70d70)
   at ../../src/SendEvent.c:46
#1  0x00007f8c0ab4193f in vcl_sal::WMAdaptor::switchToWorkArea ()
  from /usr/lib/openoffice/basis3.0/program/libvclplug_genlx.so
#2  0x00007f8c0aafdbd8 in X11SalFrame::Show ()
  from /usr/lib/openoffice/basis3.0/program/libvclplug_genlx.so
#3  0x00007f8c1378623c in Window::Show ()
  from /usr/lib/openoffice/program/../basis-link/program/libvcllx.so
#4  0x00007f8c13785f40 in Window::Show ()
  from /usr/lib/openoffice/program/../basis-link/program/libvcllx.so
#5  0x00007f8c1372cb54 in FloatingWindow::StartPopupMode ()
  from /usr/lib/openoffice/program/../basis-link/program/libvcllx.so
#6  0x00007f8c1373c877 in ?? () from /usr/lib/openoffice/program/../basis-link/program/libvcllx.so
#7  0x00007f8c1373ccf2 in ?? () from /usr/lib/openoffice/program/../basis-link/program/libvcllx.so
#8  0x00007f8c1373ce84 in ?? () from /usr/lib/openoffice/program/../basis-link/program/libvcllx.so
#9  0x00007f8c13795e7f in ?? () from /usr/lib/openoffice/program/../basis-link/program/libvcllx.so
#10 0x00007f8c13797e74 in ?? () from /usr/lib/openoffice/program/../basis-link/program/libvcllx.so
#11 0x00007f8c13796748 in ?? () from /usr/lib/openoffice/program/../basis-link/program/libvcllx.so
#12 0x00007f8c0aafe6f8 in X11SalFrame::HandleMouseEvent ()
  from /usr/lib/openoffice/basis3.0/program/libvclplug_genlx.so
#13 0x00007f8c0ab040c2 in X11SalFrame::Dispatch ()
  from /usr/lib/openoffice/basis3.0/program/libvclplug_genlx.so
#14 0x00007f8c0ab31625 in SalX11Display::Yield ()
  from /usr/lib/openoffice/basis3.0/program/libvclplug_genlx.so
#15 0x00007f8c0ab356f3 in ?? () from /usr/lib/openoffice/basis3.0/program/libvclplug_genlx.so
#16 0x00007f8c0ab2df1f in SalXLib::Yield () from /usr/lib/openoffice/basis3.0/program/libvclplug_genlx.so
#17 0x00007f8c135b050e in Application::Yield ()
  from /usr/lib/openoffice/program/../basis-link/program/libvcllx.so
#18 0x00007f8c135b0587 in Application::Execute ()
  from /usr/lib/openoffice/program/../basis-link/program/libvcllx.so
#19 0x00007f8c17517e80 in ?? () from /usr/lib/openoffice/program/../basis-link/program/libsofficeapp.so
#20 0x00007f8c135b4b24 in ?? () from /usr/lib/openoffice/program/../basis-link/program/libvcllx.so
#21 0x00007f8c135b4bc5 in SVMain () from /usr/lib/openoffice/program/../basis-link/program/libvcllx.so
#22 0x00007f8c1754ca6c in soffice_main ()
  from /usr/lib/openoffice/program/../basis-link/program/libsofficeapp.so
#23 0x000000000040105b in main ()

I started digging more into the code, and this is what I finally found in salframe.cxx:

       // #i45160# switch to desktop where a dialog with parent will appear 
       if( mpParent && mpParent->m_nWorkArea != m_nWorkArea ) 
           GetDisplay()->getWMAdaptor()->switchToWorkArea( mpParent->m_nWorkArea );

Beautiful! It even has a comment with a IssueZilla bug number. Let's go and see where it comes from.

After 10 minutes of research to find that fucking IZ, I finally found the link to the issue #45160. The bug is IMHO not related to OOo but to a window manager doing poor job.

I've found that an awesome user already reported an bug… err, wait, I mean an issue as issue #96684 (remember there's no bug in OOo, only issues) and I commented about it.

UPDATE: It seems OOo developers have agreed to fix that bug eventually.

jeudi, janvier 29 2009

startup-notification port to XCB

Since Tuesday, I've begun to work on XCB portage of the startup-notification library.

I've just completed the job, and send a bunch of patches to the XDG mailing list. My work is available in my startup-notification git repository.

If the patches are merged, which I don't doubt, I'll be able to use this lib into awesome, which would be nice step to the Freedesktop standard compliance I like to make.

mercredi, janvier 7 2009

The ignorance test

This is one of the most stupid test I ever encountered. It seems this sort of things happens when you have no clue about the technology you are talking about.

Just imagine the famous Road Runner. This benchmark is about measuring how fast is the animal below:

Meep meep!

Yeah, indeed, this is not a Road Runner.

mercredi, septembre 17 2008

xcb-util 0.3.0 released

I just released XCB util and announced on XCB xorg-announce lists at Freedesktop.

This version has seen some of the modules totally rewritten, like ICCCM, event, reply or property. It also has a lot more documentation than previous, so I've set up doxygen documentation online.

It was the last step before releasing awesome 3 final… hm hm.