Date: Fri, 29 Jan 2010 19:09:39 -0700 (MST) From: Warren Block <wblock@wonkity.com> To: freebsd-emulation@freebsd.org Subject: [patch] VBoxSDL --grabimmediate Message-ID: <alpine.BSF.2.00.1001291854080.47872@wonkity.com>
next in thread | raw e-mail | index | archive | help
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: <alpine.BSF.2.00.1001291909390.47872@wonkity.com> 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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.1001291854080.47872>