agwells / pywo

Automatically exported from code.google.com/p/pywo
GNU General Public License v3.0
0 stars 0 forks source link

Crashes terminator in Openbox #5

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. run pywo --daemon in Lubuntu 10.10 (uses Openbox as WM)
2. install and run Terminator (the split-screen terminal)
   I use "terminator -d --sync" to get debug output
3. move the Terminator window with Pywo shortcut keys

What is the expected output? What do you see instead?

The Terminator window should move at the desired location. It crashes instead 
with:

ConfigBase::get_item: ConfigBase::get_item: title_transmit_fg_color found in 
globals: #ffffff
ConfigBase::get_item: ConfigBase::get_item: title_transmit_bg_color found in 
globals: #94da3a
ConfigBase::get_item: ConfigBase::get_item: title_transmit_fg_color found in 
globals: #ffffff
ConfigBase::get_item: ConfigBase::get_item: title_transmit_bg_color found in 
globals: #94da3a
ConfigBase::get_item: ConfigBase::get_item: show_titlebar found in profile 
default: True
Titlebar::get_desired_visibility: configured visibility: True
ConfigBase::get_item: ConfigBase::get_item: show_titlebar found in profile 
default: True
ConfigBase::get_item: ConfigBase::get_item: show_titlebar found in profile 
default: True
Titlebar::get_desired_visibility: configured visibility: True
ConfigBase::get_item: ConfigBase::get_item: show_titlebar found in profile 
default: True
Titlebar::update_visibility: showing titlebar
ConfigBase::get_item: ConfigBase::get_item: geometry_hinting found in globals: 
True
Window::set_rough_geometry_hints: setting geometry hints: 
(ewidth:6)(eheight:24),(fwidth:6)(fheight:13)
The program 'terminator' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadAlloc (insufficient resources for operation)'.
  (Details: serial 2836 error_code 11 request_code 53 minor_code 0)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)

What version of the product are you using? On what operating system?

Pywo trunk revision 124, Terminator 0.95-0ubuntu1 on Ubuntu 10.10 in a 
lubuntu-desktop session.

Please provide any additional information below.

Terminator is based on Gnome-Terminal which works correctly with Pywo.

Original issue reported on code.google.com by akaih...@gmail.com on 14 Feb 2011 at 8:28

GoogleCodeExporter commented 9 years ago
Oh, and on the GNOME desktop Pywo moves and resizes the Terminator window 
correctly.

Original comment by akaih...@gmail.com on 14 Feb 2011 at 8:29

GoogleCodeExporter commented 9 years ago
Can't reproduce. I've tried Ubuntu 10.04 with Openbox session and Terminator 
0.90; Lubuntu 10.10 and Terminator 0.95. On both setups moving around 
Terminator window using PyWO works OK.

With running terminator please, in second terminal please run "pywo debug 
terminator" and paste here the output. This will print out some debug 
informations about window manager, terminator window, and try to move window to 
the same position as it is now. Please tell me if it crashes Terminator or not.

Original comment by kosci...@gmail.com on 14 Feb 2011 at 7:16

GoogleCodeExporter commented 9 years ago
This didn't crash Terminator:

$ pywo debug terminator
Xlib.protocol.request.QueryExtension
-= Window Manager =-
WindowManager=Openbox
Desktops=2, current=0
Desktop=<Size width=1024, height=600>
Viewport=<Position x=0, y=0>
Workarea=<Geometry x=0, y=24, width=1024, height=576, x2=1024, y2=600>
-= Current Window =-
ID=46137389
Client_machine=morris
Name=Issue 5 - pywo - Crashes terminator in Openbox - Project Hosting on Google 
Code - Chromium
Class=chromium-browser.Chromium-browser
Type=['_NET_WM_WINDOW_TYPE_NORMAL']
State=[]
WM State={'state': 1, 'icon': 0}
Desktop=0
Extents=<Extents left=0, right=-176, top=50, bottom=-1320>
Extents=['0', '-176', '50', '-1320']
Geometry=<Geometry x=0, y=50, width=1024, height=600, x2=1024, y2=650>
Geometry_raw=<Xlib.protocol.request.GetGeometry serial = 211, data = {'height': 
1870, 'width': 1200, 'depth': 24, 'y': 0, 'x': 0, 'border_width': 0, 'root': 
<Xlib.display.Window 0x000000b6>, 'sequence_number': 211}, error = None>
Geometry_translated=<Xlib.protocol.request.TranslateCoords serial = 213, data = 
{'y': -50, 'x': 0, 'sequence_number': 213, 'same_screen': 1, 'child': 0}, error 
= None>
Parent=None None
Normal_hints={'width_inc': 0, 'height_inc': 0, 'min_aspect': 
Xlib.protocol.rq.DictWrapper({'num': 0, 'denum': 0}), 'max_height': 0, 
'max_aspect': Xlib.protocol.rq.DictWrapper({'num': 0, 'denum': 0}), 
'min_height': 82, 'win_gravity': 1, 'flags': 528, 'max_width': 0, 'min_width': 
340, 'base_width': 0, 'base_height': 0}
Attributes=<Xlib.protocol.request.GetWindowAttributes serial = 217, data = 
{'do_not_propagate_mask': 8204, 'your_event_mask': 0, 'override_redirect': 0, 
'bit_gravity': 1, 'all_event_masks': 14909567, 'save_under': 0, 'visual': 33, 
'win_class': 1, 'backing_bit_planes': 4294967295L, 'backing_store': 0, 
'map_state': 2, 'win_gravity': 1, 'map_is_installed': 1, 'backing_pixel': 0, 
'sequence_number': 217, 'colormap': <Xlib.xobject.colormap.Colormap 
0x00000020>}, error = None>
Query_tree=<Xlib.protocol.request.QueryTree serial = 218, data = {'root': 
<Xlib.display.Window 0x000000b6>, 'parent': <Xlib.display.Window 0x00c0086d>, 
'sequence_number': 218, 'children': [<Xlib.display.Window 0x02c0002e>, 
<Xlib.display.Window 0x02c01a7e>, <Xlib.display.Window 0x02c01f19>, 
<Xlib.display.Window 0x02c01211>, <Xlib.display.Window 0x02c011c1>, 
<Xlib.display.Window 0x02c0123f>, <Xlib.display.Window 0x02c009cc>]}, error = 
None>
-= Move with same geometry =-
New geometry=<Geometry x=0, y=50, width=1024, height=600, x2=1024, y2=650>
-= End of debug =-

It always crashes when I try Ctrl-Shift-2. Here's my corresponding layout entry:

[bottom]
direction = BOTTOM
position = BOTTOM
gravity = BOTTOM
widths = THIRD, THIRD*2, FULL
heights = HALF, THIRD, THIRD*2

Original comment by akaih...@gmail.com on 15 Feb 2011 at 10:22

GoogleCodeExporter commented 9 years ago
Hm, I see now that the debug output in my previous message dumped information 
about Chromium, not Terminator. I tried "pywo debug Terminator" as well, and 
"sleep 5 ; pywo debug terminator" focusing the Terminator window during the 5 
second sleep. Always dumps Chromium data instead.

Original comment by akaih...@gmail.com on 15 Feb 2011 at 10:24

GoogleCodeExporter commented 9 years ago
After closing Chromium I managed to get a good debug dump. This didn't crash 
Terminator either:

$ pywo debug terminator
Xlib.protocol.request.QueryExtension
-= Window Manager =-
WindowManager=Openbox
Desktops=2, current=0
Desktop=<Size width=1024, height=600>
Viewport=<Position x=0, y=0>
Workarea=<Geometry x=0, y=24, width=1024, height=576, x2=1024, y2=600>
-= Current Window =-
ID=56623107
Client_machine=morris
Name=/bin/bash
Class=terminator.Terminator
Type=['_NET_WM_WINDOW_TYPE_NORMAL']
State=[]
WM State={'state': 1, 'icon': 0}
Desktop=0
Extents=<Extents left=269, right=113, top=159, bottom=14>
Extents=['269', '113', '159', '14']
Geometry=<Geometry x=269, y=159, width=1024, height=600, x2=1293, y2=759>
Geometry_raw=<Xlib.protocol.request.GetGeometry serial = 188, data = {'height': 
427, 'width': 642, 'depth': 24, 'y': 0, 'x': 0, 'border_width': 0, 'root': 
<Xlib.display.Window 0x000000b6>, 'sequence_number': 188}, error = None>
Geometry_translated=<Xlib.protocol.request.TranslateCoords serial = 190, data = 
{'y': -159, 'x': -269, 'sequence_number': 190, 'same_screen': 1, 'child': 0}, 
error = None>
Parent=None None
Normal_hints={'width_inc': 6, 'height_inc': 13, 'min_aspect': 
Xlib.protocol.rq.DictWrapper({'num': 0, 'denum': 0}), 'max_height': 0, 
'max_aspect': Xlib.protocol.rq.DictWrapper({'num': 0, 'denum': 0}), 
'min_height': 0, 'win_gravity': 1, 'flags': 832, 'max_width': 0, 'min_width': 
0, 'base_width': 6, 'base_height': 24}
Attributes=<Xlib.protocol.request.GetWindowAttributes serial = 194, data = 
{'do_not_propagate_mask': 8204, 'your_event_mask': 0, 'override_redirect': 0, 
'bit_gravity': 1, 'all_event_masks': 14909567, 'save_under': 0, 'visual': 33, 
'win_class': 1, 'backing_bit_planes': 4294967295L, 'backing_store': 0, 
'map_state': 2, 'win_gravity': 1, 'map_is_installed': 1, 'backing_pixel': 0, 
'sequence_number': 194, 'colormap': <Xlib.xobject.colormap.Colormap 
0x00000020>}, error = None>
Query_tree=<Xlib.protocol.request.QueryTree serial = 195, data = {'root': 
<Xlib.display.Window 0x000000b6>, 'parent': <Xlib.display.Window 0x00c0206b>, 
'sequence_number': 195, 'children': [<Xlib.display.Window 0x03600004>]}, error 
= None>
-= Move with same geometry =-
New geometry=<Geometry x=269, y=159, width=1024, height=600, x2=1293, y2=759>
-= End of debug =-

Original comment by akaih...@gmail.com on 15 Feb 2011 at 10:27

GoogleCodeExporter commented 9 years ago
Forgot to mention that PyWO tries to match the window title first, than window 
class name.

I can see that there's something wrong with calculation of window decorations 
(extents), and this might cause the problems.

Original comment by kosci...@gmail.com on 15 Feb 2011 at 6:21

GoogleCodeExporter commented 9 years ago
I took a look at my Terminator configuration. I had "borderless = True" in the 
[global_config] section of ~/.config/terminator/config. I commented that out, 
and now all works as expected.

Except that I don't like borders on my terminal windows :)

Would it difficult to handle borderless windows correctly?

Original comment by akaih...@gmail.com on 16 Feb 2011 at 10:01

GoogleCodeExporter commented 9 years ago
Could you paste debug info for Terminator with, and without borderless setting?
And debug info for any window with normal decorations (LXTerminal, or file 
manager)

Someone already has posted an issue with borderless windows (Chrome by default 
uses it's own decorations). I've fixed it in Metacity, and Compiz, but it seems 
Openbox treats such windows differently. I'll take a look what's going on and 
try to fix it.

BTW in Openbox you can set borderless mode for the window, I'll also try to get 
this to be recognized by PyWO since it causes some problems right now.

Original comment by kosci...@gmail.com on 16 Feb 2011 at 1:06

GoogleCodeExporter commented 9 years ago
Managed to reproduce the bug. I'll update the issue after commiting the fixed 
version to the repository.

Original comment by kosci...@gmail.com on 17 Feb 2011 at 7:47

GoogleCodeExporter commented 9 years ago
I've just commited new version, that should fix the problem. As a bonus there's 
now support for Openbox undecorated windows.

Original comment by kosci...@gmail.com on 18 Feb 2011 at 9:49