Skip to content

Commit

Permalink
Use a random-generated uint as the bridge ID.
Browse files Browse the repository at this point in the history
  • Loading branch information
zdobersek committed Jan 29, 2019
1 parent e8951d4 commit bbbb525
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/renderer-backend-egl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,7 @@ class Target {
wl_proxy_set_queue(reinterpret_cast<struct wl_proxy*>(m_wl.surface), m_wl.eventQueue);
m_wl.window = wl_egl_window_create(m_wl.surface, width, height);

// FIXME: this should be enough?
uint32_t bridgeID = (*reinterpret_cast<uintptr_t*>(this)) & 0xffffffff;
uint32_t bridgeID = g_random_int();
wpe_bridge_connect(m_wl.wpeBridge, m_wl.surface, bridgeID);
wl_display_roundtrip_queue(display, m_wl.eventQueue);

Expand Down

0 comments on commit bbbb525

Please sign in to comment.