From owner-freebsd-emulation@FreeBSD.ORG Sat Jan 30 02:39:19 2010 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF6971065670 for ; Sat, 30 Jan 2010 02:39:19 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) by mx1.freebsd.org (Postfix) with ESMTP id 9B28D8FC17 for ; Sat, 30 Jan 2010 02:39:19 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.3/8.14.3) with ESMTP id o0U29dRh047929 for ; Fri, 29 Jan 2010 19:09:39 -0700 (MST) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.3/8.14.3/Submit) with ESMTP id o0U29dJW047926 for ; Fri, 29 Jan 2010 19:09:39 -0700 (MST) (envelope-from wblock@wonkity.com) Date: Fri, 29 Jan 2010 19:09:39 -0700 (MST) From: Warren Block To: freebsd-emulation@freebsd.org Message-ID: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="-902635197-1710670985-1264817379=:47872" X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.3 (wonkity.com [127.0.0.1]); Fri, 29 Jan 2010 19:09:40 -0700 (MST) Subject: [patch] VBoxSDL --grabimmediate X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jan 2010 02:39:20 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. ---902635197-1710670985-1264817379=:47872 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII The attached patch adds a --grabimmediate option to VBoxSDL. This lets VBoxSDL start with the mouse and keyboard input already grabbed. Use cases: For console-only guests, the mouse pointer is useless and only goes away when the user clicks. Running full-screen guests, one would usually want the input grabbed immediately anyway. (It could be argued that the --fullscreen option should grab input immediately by default.) To use, copy the patch to /usr/ports/emulators/virtualbox-ose and rebuild the port. Feedback welcome. -Warren Block * Rapid City, South Dakota USA ---902635197-1710670985-1264817379=:47872 Content-Type: TEXT/PLAIN; charset=US-ASCII; name=patch-src-VBox-Frontends-VBoxSDL-VBoxSDL.cpp-WB Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename=patch-src-VBox-Frontends-VBoxSDL-VBoxSDL.cpp-WB LS0tIHNyYy9WQm94L0Zyb250ZW5kcy9WQm94U0RML1ZCb3hTREwuY3BwLm9y aWcJMjAwOS0xMi0xNyAwNzoyNzo1Ni4wMDAwMDAwMDAgLTA3MDANCisrKyBz cmMvVkJveC9Gcm9udGVuZHMvVkJveFNETC9WQm94U0RMLmNwcAkyMDEwLTAx LTI4IDA5OjM2OjI3LjAwMDAwMDAwMCAtMDcwMA0KQEAgLTE3OCw2ICsxNzgs NyBAQA0KIHN0YXRpYyBjb25zdCBjaGFyICpnSG9zdEtleURpc2FibGVkQ29t YmluYXRpb25zID0gIiI7DQogc3RhdGljIGNvbnN0IGNoYXIgKmdwc3pQaWRG aWxlOw0KIHN0YXRpYyBCT09MIGdmR3JhYmJlZCA9IEZBTFNFOw0KK3N0YXRp YyBCT09MIGdmR3JhYkltbWVkaWF0ZSA9IEZBTFNFOw0KIHN0YXRpYyBCT09M IGdmR3JhYk9uTW91c2VDbGljayA9IFRSVUU7DQogc3RhdGljIEJPT0wgZ2ZG dWxsc2NyZWVuUmVzaXplID0gRkFMU0U7DQogc3RhdGljIEJPT0wgZ2ZJZ25v cmVOZXh0UmVzaXplID0gRkFMU0U7DQpAQCAtNjYzLDYgKzY2NCw3IEBADQog ICAgICAgICAgICAgICIgIC0tbm9ob3N0a2V5ICAgICAgICAgICAgICBEaXNh YmxlIGFsbCBob3N0a2V5IGNvbWJpbmF0aW9uc1xuIg0KICAgICAgICAgICAg ICAiICAtLW5vaG9zdGtleXMgLi4uICAgICAgICAgRGlzYWJsZSBzcGVjaWZp YyBob3N0a2V5IGNvbWJpbmF0aW9ucywgc2VlIGJlbG93IGZvciB2YWxpZCBr ZXlzXG4iDQogICAgICAgICAgICAgICIgIC0tbm9ncmFib25jbGljayAgICAg ICAgICBEaXNhYmxlIG1vdXNlL2tleWJvYXJkIGdyYWJiaW5nIG9uIG1vdXNl IGNsaWNrIHcvbyBhZGRpdGlvbnNcbiINCisgICAgICAgICAgICAgIiAgLS1n cmFiaW1tZWRpYXRlICAgICAgICAgIFN0YXJ0IHdpdGggZ3JhYiBhY3RpdmVc biINCiAgICAgICAgICAgICAgIiAgLS1kZXRlY3Rob3N0a2V5ICAgICAgICAg IEdldCB0aGUgaG9zdGtleSBpZGVudGlmaWVyIGFuZCBtb2RpZmllciBzdGF0 ZVxuIg0KICAgICAgICAgICAgICAiICAtLWhvc3RrZXkgPGtleT4gezxrZXky Pn0gPG1vZD4gU2V0IHRoZSBob3N0IGtleSB0byB0aGUgdmFsdWVzIG9idGFp bmVkIHVzaW5nIC0tZGV0ZWN0aG9zdGtleVxuIg0KICAgICAgICAgICAgICAi ICAtLXRlcm1hY3BpICAgICAgICAgICAgICAgU2VuZCBhbiBBQ1BJIHBvd2Vy IGJ1dHRvbiBldmVudCB3aGVuIGNsb3NpbmcgdGhlIHdpbmRvd1xuIg0KQEAg LTEyMDAsNiArMTIwMiwxMSBAQA0KICAgICAgICAgew0KICAgICAgICAgICAg IGdmR3JhYk9uTW91c2VDbGljayA9IEZBTFNFOw0KICAgICAgICAgfQ0KKyAg ICAgICAgZWxzZSBpZiAoICAgIXN0cmNtcChhcmd2W2N1ckFyZ10sICItLWdy YWJpbW1lZGlhdGUiKQ0KKyAgICAgICAgICAgICAgICAgfHwgIXN0cmNtcChh cmd2W2N1ckFyZ10sICItZ3JhYmltbWVkaWF0ZSIpKQ0KKyAgICAgICAgew0K KyAgICAgICAgICAgIGdmR3JhYkltbWVkaWF0ZSA9IFRSVUU7DQorICAgICAg ICB9DQogICAgICAgICBlbHNlIGlmICggICAhc3RyY21wKGFyZ3ZbY3VyQXJn XSwgIi0tdGVybWFjcGkiKQ0KICAgICAgICAgICAgICAgICAgfHwgIXN0cmNt cChhcmd2W2N1ckFyZ10sICItdGVybWFjcGkiKSkNCiAgICAgICAgIHsNCkBA IC0xODU5LDcgKzE4NjYsNyBAQA0KICAgICAgICAgLy8gY3JlYXRlIG91ciBT REwgZnJhbWVidWZmZXIgaW5zdGFuY2UNCiAgICAgICAgIGdwRnJhbWVidWZm ZXJbaV0gPSBuZXcgVkJveFNETEZCKGksIGZGdWxsc2NyZWVuLCBmUmVzaXph YmxlLCBmU2hvd1NETENvbmZpZywgZmFsc2UsDQogICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICBmaXhlZFdpZHRoLCBmaXhlZEhl aWdodCwgZml4ZWRCUFApOw0KDQogICAgICAgICBpZiAoIWdwRnJhbWVidWZm ZXJbaV0pDQogICAgICAgICB7DQogICAgICAgICAgICAgUlRQcmludGYoIkVy cm9yOiBjb3VsZCBub3QgY3JlYXRlIGZyYW1lYnVmZmVyIG9iamVjdCFcbiIp Ow0KQEAgLTE5OTYsNiArMjAwMywxMiBAQA0KICAgICB9DQogI2VuZGlmDQog DQorICAgIC8qDQorICAgICAqIFdCOiAtLWdyYWJpbW1lZGlhdGU6IGdyYWIg bW91c2UgaW5wdXQgYXMgc29vbiBhcyBwb3NzaWJsZS4NCisgICAgICovDQor ICAgIGlmIChnZkdyYWJJbW1lZGlhdGUpDQorICAgICAgICBJbnB1dEdyYWJT dGFydCgpOw0KKw0KICAgICByYyA9IEVfRkFJTDsNCiAjaWZkZWYgVkJPWFNE TF9BRFZBTkNFRF9PUFRJT05TDQogICAgIGlmIChmUmF3UjAgIT0gfjBVKQ0K QEAgLTIzMDYsNyArMjMxOSw3IEBADQogICAgICAgICBSVEZpbGVXcml0ZShQ aWRGaWxlLCBwY3N6TGYsIHN0cmxlbihwY3N6TGYpLCBOVUxMKTsNCiAgICAg ICAgIFJURmlsZUNsb3NlKFBpZEZpbGUpOw0KICAgICB9DQoNCiAgICAgLyoN CiAgICAgICogTWFpbiBldmVudCBsb29wDQogICAgICAqLw0K ---902635197-1710670985-1264817379=:47872--