Xfce Wiki

Sub domains

This is an old revision of the document!

Patches for the window Manager (xfwm4)

Note: I created this page to post some modifications (adjustments?) I have made to xfwm4. They are not major but they have really improved my own experience with Xfce.

Ability to resize windows by dragging the top of the frame

With xfwm4, you can resize windows by dragging either side of the frame (left or right), the bottom, or any corner, but you cannot resize by dragging the top. Dragging the whole titlebar always moves the window only. I wanted to be able to resize by dragging the top. In themes where the title bar stretches across the width of the window, dragging the title bar should move the window (existing behaviour) if you aim in the “body” of the title bar but resize it if you aim along a narrow strip at the top. This makes it consistent with how you can resize the window by dragging the narrow strips on all the other sides and corners. In themes where the title bar does not stretch across the width of the window, the same behaviour should result in the fraction of the top where the title bar appears, and the rest of the top side should work just like the other sides.

As suggested, the exact behaviour of this feature depends on the theme, so it means that some extra information has to be included in the theme to take advantage of it. Unfortunately, I only prepared the modifications for the theme I use: B5. The change has no effect if you use any theme that does not include the new additions.


  • Apply the patch to the xfwm4 version 4.4.1 source code, recompile, and reinstall.
  • Create 10 new pixmaps for the theme to go with the 5 title pixmaps (in active and inactive states):
    • title-1-active.xpmtitle-1-resize-active.xpm
    • title-1-inactive.xpmtitle-1-resize-inactive.xpm
    • title-2-active.xpmtitle-2-resize-active.xpm
    • title-2-inactive.xpmtitle-2-resize-inactive.xpm
    • title-3-active.xpmtitle-3-resize-active.xpm
    • title-3-inactive.xpmtitle-3-resize-inactive.xpm
    • title-4-active.xpmtitle-4-resize-active.xpm
    • title-5-inactive.xpmtitle-4-resize-inactive.xpm
    • title-5-active.xpmtitle-5-resize-active.xpm
    • title-5-inactive.xpmtitle-5-resize-inactive.xpm

The “resize” versions should have the same dimensions as the non-“resize” versions but only the part(s) of the titlebar that should trigger resizing should be masked in. For example (for most themes), the “resize” versions should have everything but a narrow strip at the top masked out.

The extra pixmaps I have created for the B5 theme are available as an archive or as indidivual files. Add these files to your theme directory (all existing files should be untouched).