OpenTTD

Tasklist

FS#6087 - [OSX] QuickDraw subdriver has keyboard and mouse problems

Attached to Project: OpenTTD
Opened by George Koehler (kernigh2) - Friday, 15 August 2014, 22:18 GMT
Type Bug
Category Interface
Status New
Assigned To No-one
Operating System Mac OS X
Severity Low
Priority Normal
Reported Version trunk
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

I compiled my own binaries of OpenTTD 1.4.2-RC2 and OpenTTD trunk r26733 for PowerPC Mac OS X 10.4.11. (I can't run the official binary because of FS#5694.) It has some keyboard and mouse problems. Compiling with --disable-cocoa-quickdraw fixes the problems.

The keyboard just doesn't work. I open the console, or rename a station, and press some keys. For each key, the computer beeps and no character appears. As a work-around, I can double-click the text field and use OpenTTD's onscreen keyboard. This doesn't work in the console, so I can't enter any console commands.

The mouse does work, but OpenTTD does not correctly hide the mouse cursor. When my mouse is in the window, I have two mouse cursors, with the Mac's black arrow on top of OpenTTD's brown arrow. When my mouse is outside the window, the black arrow goes out but the brown arrow stays near the edge of the window.

This bug only happens with the QuickDraw subdriver. When I pass --disable-cocoa-quickdraw to configure, I force OpenTTD to use the Quartz subdriver and prevent this bug.

Here is my procedure to compile and run OpenTTD 1.4.2-RC2:
./configure --with-lzo2=$HOME/park/static/lib --disable-cocoa-quickdraw
make -j2
make bundle
open bundle/OpenTTD.app

To reproduce this bug, you may need a OS X 10.4 system. The logic in src/video/cocoa/cocoa_v.mm, function QZ_CreateWindowSubdriver(), prefers the Quartz subdriver for 10.5 and later, and the QuickDraw subdriver for 10.4 and earlier. The official binary doesn't run on PowerPC (FS#5694 again), so you either need to find an Intel 10.4 system, or compile your own PowerPC binary. Most Intel Macs have been upgraded, but some PowerPC Macs stayed with 10.4 to use Classic.

If you have 10.5 or later, you might reproduce this bug if you compile a binary with --disable-cocoa-quartz. I have not tried this.

To reproduce this bug:
1. Start OpenTTD.
2. Move the mouse around the title screen.
3. Click "Multiplayer" and try to type in the text fields.

It might be time to retire the QuickDraw subdriver and always use the Quartz subdriver. It is no good to have a QuickDraw subdriver only for 10.4 and earlier that accumulates bugs because almost everyone runs 10.5 or later.
This task depends upon

Loading...