huge change: implement RandR instead of Xinerama
Thanks to Merovius for doing a proof of concept on this one and being a driving force behind the idea. Using RandR instead of Xinerama means that we are now able to use the full potential of the modern way of configuring screens. That means, i3 now has an idea of the outputs your graphic driver provides, which allowed us to get rid of the ugly way of detecting changes in the screen configuration which we used before. Now, your workspaces should not be confused when changing output modes anymore. Also, instead of having ugly heuristics to assign your workspaces to (the screen at position X or the second screen in the list of screens) you will be able to just specify an output name. As this change basically touches everything, you should be prepared for bugs. Please test and report them!
This commit is contained in:
@ -24,7 +24,7 @@
|
||||
#include "xcb.h"
|
||||
#include "debug.h"
|
||||
#include "layout.h"
|
||||
#include "xinerama.h"
|
||||
#include "randr.h"
|
||||
#include "config.h"
|
||||
#include "floating.h"
|
||||
#include "workspace.h"
|
||||
@ -38,7 +38,7 @@
|
||||
int resize_graphical_handler(xcb_connection_t *conn, Workspace *ws, int first, int second,
|
||||
resize_orientation_t orientation, xcb_button_press_event_t *event) {
|
||||
int new_position;
|
||||
i3Screen *screen = get_screen_containing(event->root_x, event->root_y);
|
||||
struct xoutput *screen = get_screen_containing(event->root_x, event->root_y);
|
||||
if (screen == NULL) {
|
||||
ELOG("BUG: No screen found at this position (%d, %d)\n", event->root_x, event->root_y);
|
||||
return 1;
|
||||
@ -49,7 +49,7 @@ int resize_graphical_handler(xcb_connection_t *conn, Workspace *ws, int first, i
|
||||
* screens during runtime. Instead, we just use the most right and most
|
||||
* bottom Xinerama screen and use their position + width/height to get
|
||||
* the area of pixels currently in use */
|
||||
i3Screen *most_right = get_screen_most(D_RIGHT, screen),
|
||||
struct xoutput *most_right = get_screen_most(D_RIGHT, screen),
|
||||
*most_bottom = get_screen_most(D_DOWN, screen);
|
||||
|
||||
DLOG("event->event_x = %d, event->root_x = %d\n", event->event_x, event->root_x);
|
||||
|
Reference in New Issue
Block a user