Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

diff --git a/ports/glutin/window.rs b/ports/glutin/window.rs
index ddd5398845..0f69b30a9e 100644
--- a/ports/glutin/window.rs
+++ b/ports/glutin/window.rs
@@ -1179,7 +1179,15 @@ impl WindowMethods for Window {
}
fn prepare_for_composite(&self, _width: usize, _height: usize) -> bool {
- true
+ match self.kind {
extern crate synchro_servo;
extern crate synchro_glwindows;
use synchro_glwindows::{GLWindow, GLWindowId};
use synchro_servo::{Constellation, Compositor, DrawableGeometry, View, Browser, ServoUrl};
fn main() {
let url = ServoUrl::parse("http://example.com").unwrap();
@paulrouget
paulrouget / Cargo.toml
Created February 1, 2017 07:33
winit issue
[package]
name = "hello_world"
version = "0.1.0"
authors = ["Paul Rouget <me@paulrouget.com>"]
[dependencies]
# If I use winit = "*" instead, it compiles
# Using my own clone, it doesn't compile (eventhough it's the same version)
winit = {path = "../winit"} # clone of https://github.com/tomaka/winit
# Glutin depends on winit too
Verifying that +paulrouget is my blockchain ID. https://onename.com/paulrouget
{"version":"0.1.5","mode":"create-web-view","shell":{"isFocused":true,"isMinimized":false,"isMaximized":false,"controls":{"close":{"isDisabled":false,"isFocused":false,"isActive":false,"isPointerOver":false,"text":""},"minimize":{"isDisabled":false,"isFocused":false,"isActive":false,"isPointerOver":false,"text":""},"toggle":{"isDisabled":false,"isFocused":false,"isActive":false,"isPointerOver":false,"isChecked":false,"text":""}}},"input":{"value":"xxxxxxl size","isFocused":true,"isVisible":true,"selection":{"start":4,"end":12,"direction":"forward"}},"assistant":{"isOpen":true,"isExpanded":true,"query":"xxxx","search":{"query":"xxxx","size":5,"queryID":4,"limit":5,"selected":0,"matches":{"https://duckduckgo.com/?q=xxxxxxl%20size":{"title":"xxxxxxl size","uri":"https://duckduckgo.com/?q=xxxxxxl%20size"},"https://duckduckgo.com/?q=xxxxxxxxl%20size%20cxx%20clothing":{"title":"xxxxxxxxl size cxx clothing","uri":"https://duckduckgo.com/?q=xxxxxxxxl%20size%20cxx%20clothing"},"https://duckduckgo.com/?q=xxxx%20audio%2
@paulrouget
paulrouget / powermetrics_parser.js
Last active April 4, 2016 10:56
plot powermetrics results
var TIME = 30 * 1000;
var SAMPLE_TIME = 500;
const TARGET = "servo";
var exec = require('child_process').exec;
var is_root = process.getuid && process.getuid() === 0;
if (!is_root) {
console.error("Not root");
<div style="width: 200px; height: 10px; background: red"></div>
<script>
var div = document.querySelector("div");
var x = 0;
var sign = 1;
// Comment this line out to test with native rAF
// window.requestAnimationFrame = c => setTimeout(c, 16);
@paulrouget
paulrouget / azerty.patch
Created February 8, 2016 13:37
azerty.patch
diff --git a/components/compositing/compositor.rs b/components/compositing/compositor.rs
index f75126c..c79e7da 100644
--- a/components/compositing/compositor.rs
+++ b/components/compositing/compositor.rs
@@ -1111,8 +1111,8 @@ impl<Window: WindowMethods> IOCompositor<Window> {
self.on_navigation_window_event(direction);
}
- WindowEvent::KeyEvent(key, state, modifiers) => {
- self.on_key_event(key, state, modifiers);
diff --git a/src/browser/index.js b/src/browser/index.js
index 88d2ae6..b9806e4 100644
--- a/src/browser/index.js
+++ b/src/browser/index.js
@@ -13,7 +13,7 @@ import {Renderer} from "driver";
const logger = (update) => (model, action) => {
- console.log('>>> Action:', action);
+ // console.log('>>> Action:', action);
@paulrouget
paulrouget / package-servo.sh
Created January 13, 2016 13:12
a simple script to package servo
#!/bin/sh
set -e -x
if [[ "$OSTYPE" == "linux-gnu" ]]; then
os=linux
elif [[ "$OSTYPE" == "darwin"* ]]; then
os=mac
else
os=unknown