Comment 58 for bug 160311

Revision history for this message
Neil Broadley (scaine) wrote : Re: Window Resize Difficult (Window Border Thickness)

I have managed to manually hack the theme files to allow for a larger border. Obviously, not really a solution and use at your own risk, but as long you make a back of the file involved (an xml file), you should have an easy time following this.

After some searching, it turns out that the pre-distributed themes such as clearlooks are located in /usr/share/themes. I'll assume you're using clearlooks, but if you'd like to edit a custom theme that you've downloaded, you'll find the same file structure, but in ~/.themes. So inside /usr/share/themes/Clearlooks/metacity-1, there's a file called metacity-theme-1.xml. You'll need to be sudo to edit this file (gksudo gedit or similar) and you should back up this file before you start.

The very first entry in the GEOMETRY section has three values that relate to the left, right and bottom borders (no idea why there's no top-border entry, but I couldn't find one). Anyway, in most themes, the default appears to be 4, which on my monitor/mouse set up translates to 2px. Of course, I'm sure the value 4 is meant to be 4px, but what I mean is that my mouse only physically moves twice before it's off the drag-area, which is why it's so damn hard to hit.

I've changed all three entries to 10. This equates to about 6 movements of my mouse over the drag-area and makes massive difference.

<!-- ::: GEOMETRY ::: -->
<frame_geometry name="normal" rounded_top_left="true" rounded_top_right="true" rounded_bottom_left="false" rounded_bottom_right="false">
 <distance name="left_width" value="10"/>
 <distance name="right_width" value="10"/>
 <distance name="bottom_height" value="10"/>
 <distance name="left_titlebar_edge" value="4"/>
 <distance name="right_titlebar_edge" value="4"/>
 <aspect_ratio name="button" value="1.0"/>
 <distance name="title_vertical_pad" value="0"/>
 <border name="title_border" left="2" right="2" top="4" bottom="3"/>
 <border name="button_border" left="1" right="1" top="2" bottom="2"/>
</frame_geometry>

Of course, if you ever change your theme, you'll have to find the corresponding theme directory and make these changes all over again. Also, in order to activate any changes after saving the file you'll have to either log out/in, or quicker still - open system/preferences/appearance and choose a different theme briefly, then switch back to the one you just edited.

I should stress, I don't see that this workaround could, in any way be construed as a fix for this bug - the appearances window should simply provide a slider, or perhaps an accessibility option is required.

I think I'll try opening another bug against gnome for this too. The more I think about this, the original gnome bug was closed because gnome feels that this is a theme related issue, and while that's probably true in the purest sense, it's crazy to suggest that I need to download new themes over and over until I find one that has thicker borders. And it's crazy to think that we need to manually edit xml files to make things better.

However, I hope this helps someone else.