After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 747273 - display-adapter: Allow setting an external default adapter instance
display-adapter: Allow setting an external default adapter instance
Status: RESOLVED FIXED
Product: caribou
Classification: Applications
Component: default
git master
Other All
: Normal normal
: ---
Assigned To: caribou-maint
caribou-maint
Depends on:
Blocks: 747274
 
 
Reported: 2015-04-02 22:36 UTC by Rui Matos
Modified: 2015-04-14 17:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
daemon: Check that we're using the X backend before using it (985 bytes, patch)
2015-04-02 22:37 UTC, Rui Matos
committed Details | Review
display-adapter: Allow setting an external default adapter instance (1.24 KB, patch)
2015-04-02 22:37 UTC, Rui Matos
committed Details | Review

Description Rui Matos 2015-04-02 22:36:58 UTC
.
Comment 1 Rui Matos 2015-04-02 22:37:04 UTC
Created attachment 300862 [details] [review]
daemon: Check that we're using the X backend before using it

This won't make us work correctly on other backends but at least we
won't print criticals anymore.
Comment 2 Rui Matos 2015-04-02 22:37:10 UTC
Created attachment 300863 [details] [review]
display-adapter: Allow setting an external default adapter instance

This will allow gnome-shell, when running as a native wayland
compositor, to set its own display adapter implementation since the X
one doesn't work for that case.
Comment 3 Daiki Ueno 2015-04-03 00:44:11 UTC
Review of attachment 300862 [details] [review]:

OK.
Comment 4 Daiki Ueno 2015-04-03 00:51:55 UTC
Review of attachment 300863 [details] [review]:

::: libcaribou/display-adapter.vala
@@ +112,2 @@
         static DisplayAdapter instance;
+        public static bool set_default (DisplayAdapter adapter) {

Perhaps this function could take the class of the adapter instead of an object, so we don't need to worry about whether the instance is already set.

Anyway either is fine, as it's a short term solution.  I guess it would be nicer that we could abandon the display related stuff in caribou and do that in gnome-shell instead.
Comment 5 Rui Matos 2015-04-14 17:42:25 UTC
(In reply to Daiki Ueno from comment #4)
> ::: libcaribou/display-adapter.vala
> @@ +112,2 @@
>          static DisplayAdapter instance;
> +        public static bool set_default (DisplayAdapter adapter) {
>

> Perhaps this function could take the class of the adapter instead of
> an object, so we don't need to worry about whether the instance is
> already set.

This wouldn't allow me to implement the DisplayAdapter in JavaScript
though :-)

> Anyway either is fine, as it's a short term solution.  I guess it
> would be nicer that we could abandon the display related stuff in
> caribou and do that in gnome-shell instead.

Yes, definitely. Thanks

Attachment 300862 [details] pushed as e3c2625 - daemon: Check that we're using the X backend before using it
Attachment 300863 [details] pushed as ad154e7 - display-adapter: Allow setting an external default adapter instance